473,836 Members | 1,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.

http://groups.google.com/group/micro...4f363036fc64f2

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
news:1e******** *************** ***********@v16 g2000prc.google groups.com...
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.
Thanks Jeff, that was helpful.

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
news:c7******** *************** ***********@o40 g2000prn.google groups.com...
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
news:1e******** *************** ***********@v16 g2000prc.google groups.com...
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.

http://groups.google.com/group/micro...4f363036fc64f2

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
news:03******** *************** ***********@c22 g2000prc.google groups.com...
>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
news:a3******** *************** ***********@u18 g2000pro.google groups.com...
>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.

Similar topics

1
2426
by: news.microsoft.com | last post by:
Hello group, My goal is to attach an image over another image. Top image should be transparent so the back image is visible through the top one. Bellow is a test code in VB.NET. You need to create a form, a button (Button1) and an Picture Box (picBox). "watermark.jpg" is any jpg image, "beispiel.tif" is a multipage TIFF image with the white background, which will turn to transparent. The most important thing here is that the TIFF image...
0
1061
by: T. F. | last post by:
Hi, can anyone give me the code of a box that the user can draw into (like with a pen)? Or a tutorial? I'd also need to know how I can edit the size of the pen style and how I can "transport" the drawn image into a smaller box (that is only around 10x10 pixel so the original image must be comprimized onto that 10x10 pixel field) and how to center it. THANK YOU SO MUCH for any help :)
5
2430
by: T. F. | last post by:
Hi, I need to create a box / field that the user can draw into (with some kind of pen). I also need to know how I can edit the size of the pen style and how I can "transport" the drawn image into a smaller box (that is only around 10x10 pixel so the original image must be comprimized onto that 10x10 pixel field..) and how to center it. ( if you guess that this is about neural networks you're right :) )
9
12970
by: Rob T | last post by:
This seems like a really stupid question, but here it goes........ is there a command to draw a single pixel? The closest I can get is to draw a line that is 2 pixels wide, or do create another image that's 1x1 with the color of the pixel, then do a DrawImage to insert that image into the 'master' image...which seems like a huge waste! Thanks.
7
2133
by: Stefan0 | last post by:
Hi, I'd like to draw a circle on the screen using GDI+ I'm using the DrawEllipse method with width = height and I set the SmootingMode to SmoothingModeAntiAlias but the circle is "squared". Is there a way to draw a "smoothed" circle ? Thanks in advance Stefano
11
630
by: itamtodd | last post by:
I am in the process of developing a small program that I will be trying to sell to different institutions. The program is written in VB and uses an Access database. Now how do I go about selling people a license for my software? And also how do I protect my software from just being ripped off, i.e. Encrypt it? Thanks
11
11277
by: dongarbage | last post by:
Hi there, I'm very much a C# novice. How do you do freehand drawing on a panel with a mouse in c#? Thanks, Don
2
2311
by: =?Utf-8?B?TWFyYyBBbGxhcmQ=?= | last post by:
Hello, I have posted this message in the normal newsgroup instead of posting it in the managed ones. I have a project in VB6 (GDI+) that will read a WMF File (created by my customer) and then resize it and insert it into a picture I have a problem with in in NET2005 (but it is OK in VB6).
1
317
by: kelvin.koogan | last post by:
In my application I'm doing some drawing in my OnPaint routine using Graphics->DrawRectangle. The rect bounds are constant and not scaled in anyway. One of our Chinese customers is seeing the rectangles appear in the wrong place. When I started investigating this I found that I got the same problems if I changed my Windows DPI settings from 96 to 120. However the customer tells me that they are using 96 DPI. Are there any other...
0
9825
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10854
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7794
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4459
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4022
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3116
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.