- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a QUICKWIN graphics setup, where I want the shape of an object to be exact.
For example, if I draw a circle, I want it to come out looking like a circle, not an ellipse.
And a square should look like a square, not a rectangle.
So this means setting up the proper parameters for SETWINDOW.
What is the easiest way to do that ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at the QuickWin samples in (on my system) C:\Program Files (x86)\Intel\Composer XE\Samples\en_US\Fortran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I know how to do the subroutine calls, but
the problem is getting the right parameters, so that i get an accurate portrayal of the geometric figures.
Other than trial and error, of course.
for example:
is the pixel size exactly square?
How many pixels are in the default window?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re aspect ratio problems: I admire your concern, which I share, and note that unfortunately a lot of people (youngsters) nowadays just don't seem to care.
But...have you actually tried it? I do it a lot (Quickwin that is) and never had any trouble--a circle always looked circular, no matter what size my window was. It could possibly be hardware dependent, though (my pixels are square, maybe not yours; just measure one of your windows to find out).
If you have tried it and find that the results are not right, post your code here along with a screen cap and then maybe someone here can help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dale -
Is that your name ? I used to know a Dale Boggs.
anyway, I did try it -
The default pixel allocation is 768 x 1024, a 3 to 4 ratio,
so that means with square pixels, my viewport limits should be
that, ratio, i.e. 15 by 20, or 90 by 120, whatever coords I want to use.
However, it still is not quite right, so I surmise I dont have "square" pixels.
I probably should just get a tape measuare, and see what the correction has to be.
The Fortran gurus really dont address this issue, unfortunately - - -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is the aspect ratio of your monitor 4:3? That would be an older, TV-like tube. Most newer monitors are 1.6:1 or 1.78:1. For these, the "normal" resolution would be, e.g., 1680x1050 or 1366x768. But screen resolutions are set by software in the video card driver, not the hardware of your video screen. There is a user-configurable setting for your video card that usually enables quite a range of resolutions, and one of them should match the aspect ratio of your monitor.
My own monitor measures 18.6" wide x 11.6" high, that is an aspect ratio of 1.6. I use it at a resolution of 1680x1050, which is also an aspect ratio of 1.6. Hence, square pixels.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
p.s. My name is Daryl, not Dale. No, I do not have a brother named Dale. Nor do I have another brother Daryl.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It appears to be hardware dependent - -
so I guess I have to bring a tape measure with me, and draw a square of say 600 X 600 pixels,
and see how that comes out, and adjust accordingly.
Thanks for your suggestions ! !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I agree with Daryl that Windows should take car of this for you if you ask for a square or a circle, with the same dimensions for width and height, you should get that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That would be very difficult though -
because we are dependent upon whatever device on the user end being used to display it.
The only way around that is to have s "standardized" hardware display, but I dont see why
we would get that in the near future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#8: "But you are not sure that the monitor used to display this resolution has "square" pixels ie 4/3 resolution on a 16/9 monitor may be enhanced to a full screen display with pixels deformation."
Quite true, but that's the whole idea I was trying to describe. If you pick a resolution aspect ratio that matches your screen aspect ration, then Windows will not distort the pixels, and they will be square. Then displayed circles will be round and squares will be square.
So Bill can draw a "square" and measure it to see if it really is square, and make an adjustment if he wants. But the result--if the adjustment is hard-coded in his program--will be subject to distortion when others use it on their own screen, or if Bill later makes an adjustment on his screen, or gets a new screen, etc. It is probably better just to manually set a screen resolution that matches the screen shape.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With reference to some answers.
I have never used QUICKWIN but I have application parts which draw graphics in Windows using GDI+ for 2D and OpenGL for 3D (both called from C++), but I have never identified such a problem and a circle is usually a circle. On a screen, pixels introduce 'discontinuous' geometry (and an image is always a bitmap) so a circle with a diameter of 10 pixels cannot appear as drawn with a compass on a paper sheet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, "pixel" size might even be different for PRINTED documents than
it is for a graphic display device.
For example, if I were going to make a document for a formal presentation.
I am wondering if that is defined formally anywhere ?
For example, a circle might look like a circle on a graphic display, but
would the aspect ratio be the SAME when I print it out?
This was formerly an issue when I worked at JPL - - but maybe some standardization
has taken place since then. The actual number of pixels would be consistent of course,
so the issue is: "How big is a pixel?"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You shouldn't have to worry about the shape of a pixel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far as I know, that is not standardized.
If it is, it would be nice to see some reference literature.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A pixel is a 'point' not a shape. The pixel per inch In X and Y are what are important not the pixel shape.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, then then X and Y pixels per inch have not been defined anywhere,
unless that is hardware dependent.
On a digital movie screen, one pixel would take up a good fraction of
an inch, I assume.
And it isnt even certain that the X and Y ratios are the same.
One would have to know that, to assure that the aspect ratio is correct.
Otherwise a 500 x 500 square would not have the right dimensions, for example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You said earlier that you want the "shape" to be exact. Now you want the dimensions to be exact? That's a lot harder, because Windows doesn't know the physical dimensions of the display, only the number of pixels in X and Y. Unless there's something seriously wrong with the display, if you draw a circle it should be a circle.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, when I draw a 600 x 600 square, on the screen,
it does not quite come out right.
Off by about 10 per cent.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page