473,836 Members | 1,472 Online

Drawing smaller than 1 pixel (how do people fool the eye?) & infinitegrids

After refering to the below thread, I take it for C# Forms 2.0, there
a way to draw a 1 pixel by 1 pixel rectangle, which I was able to do
just now successfully.

But now the question is:

has anybody ever done a 'scaling problem' for a grid where you are
'zooming out'? I can construct this no problem, but at some point you
are going to maybe go below 1 pixel for a rectangle.

Then, I notice gamer designers do an "outline" to give a sort of
virtual shape (that's not really accurate, just a visual outline to
fool the eye into thinking it's accurate, then, when you zoom in, you
get the 'real' graphical object).

Anybody ever do this? You have to have an algorithm to figure out the
'outline' of the body you are zooming out on. I'm just curious what
people do when the resolution for "Zoom out" is such that your
rectangle is smaller than 1 pixel.

Bonus question: when doing an infinite grid, what numbers do you
choose for infinity? Do you simply choose a very large number, or,
the system.max number for ints, or, some other way?

Thank you,

RL
Oct 31 '08 #1
9 4518
"raylopez99 " <ra********@yah oo.comwrote in message
has anybody ever done a 'scaling problem' for a grid where you are
'zooming out'? I can construct this no problem, but at some point you
are going to maybe go below 1 pixel for a rectangle.

Then, I notice gamer designers do an "outline" to give a sort of
virtual shape (that's not really accurate, just a visual outline to
fool the eye into thinking it's accurate, then, when you zoom in, you
get the 'real' graphical object).

Anybody ever do this? You have to have an algorithm to figure out the
'outline' of the body you are zooming out on. I'm just curious what
people do when the resolution for "Zoom out" is such that your
rectangle is smaller than 1 pixel.
There are numerous graphics algorithms for scaling built directly into the
..NET Framework, and you can use them if you want. However, I believe what
many game designers do is create multiple versions of an image or model for
different (I believe the term is) "resolution s." They have more control over
these hand-scaled images than if they let the graphics library do all the
work, and I think it's more art than science.
Oct 31 '08 #2
On Oct 31, 7:53*am, "Jeff Johnson" <i....@enough.s pamwrote:
There are numerous graphics algorithms for scaling built directly into the
.NET Framework, and you can use them if you want. However, I believe what
many game designers do is create multiple versions of an image or model for
different (I believe the term is) "resolution s." They have more control over
these hand-scaled images than if they let the graphics library do all the
work, and I think it's more art than science.

I will rely on .NET framework for scaling, since I'm not really doing
a game so i don't need the precision of a game designer.

RL
Oct 31 '08 #3
"raylopez99 " <ra********@yah oo.comwrote in message
On Oct 31, 7:53 am, "Jeff Johnson" <i....@enough.s pamwrote:

I will rely on .NET framework for scaling, since I'm not really doing
a game so i don't need the precision of a game designer.
You might want to ask future questions of this nature in
microsoft.publi c.dotnet.framew ork.drawing. Good folks in there, especially
Bob Powell.
Oct 31 '08 #4
On Oct 31, 9:18*am, "Jeff Johnson" <i....@enough.s pamwrote:
You might want to ask future questions of this nature in
microsoft.publi c.dotnet.framew ork.drawing. Good folks in there, especially
Bob Powell.
hey Thanks again! you're better than Google (I could not find such a
group even after googling it). I've stumbled across Bob Powell's
website on my own, and it's good.

RL
Oct 31 '08 #5

"raylopez99 " <ra********@yah oo.comwrote in message
After refering to the below thread, I take it for C# Forms 2.0, there
a way to draw a 1 pixel by 1 pixel rectangle, which I was able to do
just now successfully.

But now the question is:

has anybody ever done a 'scaling problem' for a grid where you are
'zooming out'? I can construct this no problem, but at some point you
are going to maybe go below 1 pixel for a rectangle.
You have to blend with the background.

For example, if you have a white background and a 1 pixel by 1 pixel black
rectangle where the edges exactly lie on pixel boundaries, then one pixel of
the background is totally covered by black, you have one black pixel. If
the rectangle is offset so the center is on a pixel boundary, then half lies
in the left pixel, half in the right, half above, half below. There are
four pixels each 1/4 covered by the rectangle and the background shows
through the rest, so there are four pixels of 75% gray (0xC0C0C0). The
result is always an affine combination of the object color and the backdrop
color, weighted by the fraction of the pixel covered by the object. This
weight is often the "alpha channel", although alpha channel can also be used
for translucency.

Oct 31 '08 #6
"raylopez99 " <ra********@yah oo.comwrote in message
>You might want to ask future questions of this nature in
microsoft.publ ic.dotnet.frame work.drawing. Good folks in there,
especially
Bob Powell.
hey Thanks again! you're better than Google (I could not find such a
group even after googling it). I've stumbled across Bob Powell's
website on my own, and it's good.
The first thing I would recommend you do is to get a newsreader. Then all
you'd have to do is browse the list of groups that your server offers. The
Web is good for a lot of things, but reading newsgroups isn't one of them.
Of course, if you eat, breathe, and sleep Web forums then maybe you'll be
happy with a Web interface. Most of us who eat, breathe, and sleep
newsgroups despise them.
Oct 31 '08 #7
On Oct 31, 1:22*pm, "Ben Voigt [C++ MVP]" <r...@nospam.no spamwrote:
You have to blend with the background.

For example, if you have a white background and a 1 pixel by 1 pixel black
rectangle where the edges exactly lie on pixel boundaries, then one pixelof
the background is totally covered by black, you have one black pixel. *If
the rectangle is offset so the center is on a pixel boundary, then half lies
in the left pixel, half in the right, half above, half below. *There are
four pixels each 1/4 covered by the rectangle and the background shows
through the rest, so there are four pixels of 75% gray (0xC0C0C0). *The
result is always an affine combination of the object color and the backdrop
color, weighted by the fraction of the pixel covered by the object. *This
weight is often the "alpha channel", although alpha channel can also be used
for translucency.
This makes sense. By successive blending, you can make the image
slowly look smaller and smaller while preserving (somewhat) the colors
and overall shape.

If you have an easy routine for this, please feel free to post it if
convenient so I can throw it into my library, in the event I ever
decide to do this trick.

RL
Oct 31 '08 #8
On Oct 31, 2:38 pm, "Jeff Johnson" <i....@enough.s pamwrote:
The first thing I would recommend you do is to get a newsreader. Then all
you'd have to do is browse the list of groups that your server offers. The
Sadly, it seems that some ISP's are starting to eliminate Usenet from
their offerings. Comcast is one such ISP:

http://tech.slashdot.org/article.pl?.../09/22/1226222

I hope this doesn't herald the end of Usenet!! It would be a shame to
see it go.

Chris
Nov 3 '08 #9
"Chris Dunaway" <du******@gmail .comwrote in message
>The first thing I would recommend you do is to get a newsreader. Then all
you'd have to do is browse the list of groups that your server offers.
The

Sadly, it seems that some ISP's are starting to eliminate Usenet from
their offerings. Comcast is one such ISP:

http://tech.slashdot.org/article.pl?.../09/22/1226222

I hope this doesn't herald the end of Usenet!! It would be a shame to
see it go.
Yeah, I'm on Brighthouse (Time/Warner) and while they themselves no longer
have NNTP servers they contracted with a 3rd party to continue to provide
NNTP to their customers.
Nov 3 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.