POV-Ray : Newsgroups : povray.binaries.images : [Geometry] Orthogonal projection (61k) : [Geometry] Orthogonal projection (61k) Server Time
8 Aug 2024 18:13:00 EDT (-0400)
  [Geometry] Orthogonal projection (61k)  
From: Simon
Date: 18 May 2005 11:06:14
Message: <428b59e6@news.povray.org>
Hi there,
  I made some tweakings to my point to plane projection algorithm, now 
the normal can move and this way I had been able to clearly understand 
that a projection of any point on a given plane, is, an orthogonal 
projection - like what the ortho camera does in povray.  Sorry if you 
had got it before me, i'm still learning all this geometry stuff...

  So you may ask "Well, it's nice, how can it be useful inside my 
scene?" and I should say it really depends on your scene, but for 
anybody that would like to stamp the vertexes of his 3D construction 
onto a plane and make it part of his 3D scene, then this is for you.

  Examples of what you could do: Make a 3D drawing with blobs, and stamp 
it on a wall, etc...

  This algorythm is very simple and can be simplified a little more, I 
do not know how the trace() function of povray performs, but it should 
be as efficient or better I think.  The computation of the destination 
vertex uses only 9 multiplications and 7 additions per vertex, making 
calculations simple.

  For anybody that is interested in this, I may release the C++ code 
(very easy to read) that calculates the destination point from a source 
point with a normal (the plane is always on the origin in my algo).  Or 
I may translate it into a povray macro where it should work like this:

dstPoint = ortho_projection(srcPoint, NormalVector)

  If you're interested, let me know, if now, let me go on to my next 
project, which is to create a super efficient algorythm for displaying 
height fields in opengl (can effectively be used in povray to reduce 
triangle count in mesh), using various algorythm such as dynamic LOD 
(Level of Detail), etc...

Hope you like it!
  Simon


Post a reply to this message


Attachments:
Download 'ortho_projection.jpg' (61 KB)

Preview of image 'ortho_projection.jpg'
ortho_projection.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.