POV-Ray : Newsgroups : povray.general : Q: Math : Q: Math Server Time
12 Aug 2024 07:20:37 EDT (-0400)
  Q: Math  
From: Ken
Date: 14 Mar 1999 08:02:40
Message: <36EBB259.EE9B7690@pacbell.net>
Yet another 3D Pov math related exersize for the mathmaticaly
inclined.

  A triangle has three coordinates defining the locations of it's three
corners. Establishing the locations of these is pretty striaght forward
and follows the standad Pov 3 axis format.

The Challenge:

Given one of the three points is it possible to determine a right
angle to the third point. A more accurate way of describing this
is if, as viewed from a -z direction, I had a triangle whose two
bottom points (P1 -P2) were at y,0 +/- 1 and it's top point (P3)
was at y,1 x,0  how would I determine, through using math, how to
place an object like small cylinder or cone so that it is at a
right angle to the face of the triangle pointing back towards the
observer.


         object
    P3 O         P3     object at right angle
      / \          |==== 
     /   \         |
    /     \        |       ==>  -z
   /       \       |
P1 --------- P2    | P1,P2


  The solution as I see it lies with the location of the other two
corner points in three space and the location of the third in relation
to that. How to deterime that relation ship is what has me baffled.

  A use for this would be to place an object at every vertice of
a mesh object by storing the vertice locations in an array then
distributing them with the formula that will hopefully be provided
and a looping function. I understand there are inherent difficulties
involved with the initial orientation since there are two faces on
a trangle and it would be easy for the math to choose the wrong
normal but that would be a different application related exersize
that awaits the answer to the first part of the problem.

Any takers ?

Thank you,

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

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