|
Author |
Topic: Other ways of rendering a point? (Read 293 times) |
|
Ricard
|
Other ways of rendering a point?
« on: Jan 14th, 2005, 9:05pm » |
|
Hi all, I'm quite new at this so it might be a dumb question. I would like to draw a set of points and be able to move them around in a 3D space, but I wouldn't want them to look as points (I would like them to look like little squares or circles) and I don't want them to be affected (distorted) by the perspective. Anyway to do this? thanks Ricard
|
|
|
|
TomC
|
Re: Other ways of rendering a point?
« Reply #1 on: Jan 15th, 2005, 12:51am » |
|
screenX(a,b,c) and screenY(x,y,z) will give you the 2D (x ,y) window coordinate where the 3D point (a,b,c) will be drawn after applying the current transform. So you can then draw a small 2D rectangle or ellipse for each point. screenZ(a,b,c) is a little less intuitive - it gives a float value which is used to correctly draw overlapping shapes in 3D. You can also use it in order to sort your 3D points from back to front before drawing them in 2D if you require them to overlap correctly. Hope that helps.
|
|
|
|
Ricard
|
Re: Other ways of rendering a point?
« Reply #2 on: Jan 15th, 2005, 4:04pm » |
|
Hi TomC, Thanks a lot for the reply, the explanation was very good and clair. I will give it a try soon. Ricard
|
|
|
|
|