FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   Other ways of rendering a point?
« Previous topic | Next topic »

Pages: 1 
   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

WWW
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
 
Pages: 1 

« Previous topic | Next topic »