On Sep 10, 2014, at 3:46 AM, Gurwinder Singh Bains wrote: > I make a torus, using normal as 1 0 0, which makes 90 degree with both > y-axis and z-axis. Another torus with normal as 1 1 0, but it makes 45 > degree with both x-axis and y-axis. I think it uses tan inverse i.e. > tan-1(x/y). I convert this into POV-ray by using 'tan inverse' . But I > found it difficult when z comes. Is BRL-CAD uses tan for calculating > Normal? Or any concept which can also help in POV-ray. As it also > helps me in azimuth and elevation checking.
Gurwinder, No, the vector you specified is exactly the normal. Based on the comments you made on IRC a couple days ago, I suspect you're converting coordinates to Povray's left-handed system incorrectly. To convert the values, you simply need to swap Y and Z values EVERYWHERE, including in vectors and in matrices. This coincidentally will even give you the right up vector and front orientation, if I recall correctly. So if you create a torus with normal (1,1,0) in BRL-CAD, that would be a (1,0,1) normal to Povray. If you have a 4x4 matrix like: [x1 y1 z1 w1] [x2 y2 z2 w2] [x3 y3 z3 w3] [x4 y4 z4 w4] You'd swap all the values so it looks like this to Povray: [x1 z1 y1 w1] [x2 z2 y2 w2] [x3 z3 y3 w3] [x4 z4 y4 w4] For Azimuth and Elevation values, those should translate into a simple "rotation<0, Az, El>" command in Povray. See http://brlcad.org/gallery/diagrams/diagram and note that Az is a rotation around Z in BRL-CAD so it's a rotation around Y in Povray. Similarly, El is a rotation around Y in BRL-CAD, so swapped that becomes a rotation about Z in Povray. Does that all make sense? Does that help? Cheers! Sean ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ BRL-CAD Developer mailing list brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel