|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello. I have a problem regarding the MegaPOV feature, 'trace' and
surface normals detected by it. I want to rotate objects according to
the surface normal, to get boxes or other objects to stick out
perpendicular from slanted surfaces. Here is what I tried, using
information for the surface normal from trace:
rotate < Norm.z*90, 0, Norm.x*90 >
In my code the rays are shot straight down onto an object. Boxes are
placed onto the surface of the object and rotated to near accuracy,
but.... The problem is that they aren't rotated precisely! Sure, on the
more horizontal parts boxes are straight up and down, and sure, on the
vertical parts of the object the boxes are placed horizonally...but all
the ones in between down remain perpendicular to the objects' surface! I
don't get it. Is it a bug with the MegaPOV code? Is it a bug wth my own
code?
Thanks in advance. I'll post code and an image describing the problem
later, if anyone who is willing to help needs to know exactly what it
looks like.
~Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <395A2C86.6EDCD317@aol.com>, STB### [at] aolcom wrote:
> Hello. I have a problem regarding the MegaPOV feature, 'trace' and
> surface normals detected by it. I want to rotate objects according to
> the surface normal, to get boxes or other objects to stick out
> perpendicular from slanted surfaces. Here is what I tried, using
> information for the surface normal from trace:
>
> rotate < Norm.z*90, 0, Norm.x*90 >
That code is wrong. The normal values aren't angles, the normal is an
ordinary vector. The usual way of doing it is to use a matrix transform,
try using one of the ReOrient macros drifting around.
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Chris Huff wrote:
> That code is wrong. The normal values aren't angles, the normal is an
> ordinary vector. The usual way of doing it is to use a matrix transform,
> try using one of the ReOrient macros drifting around.
I thought the matrix transform was only good for skewing things.... Do you
use the normal vector somehow in the matrix transform? What does the
reorient macro do (and where can I find it)?
Thanks,
~Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <395A4421.D24D010F@aol.com>, STB### [at] aolcom wrote:
> I thought the matrix transform was only good for skewing things.... Do you
> use the normal vector somehow in the matrix transform? What does the
> reorient macro do (and where can I find it)?
http://users.erols.com/vansickl/macs.htm
And while you are at it, you might want to check out his matrix tutorial:
http://users.erols.com/vansickl/matrix.htm
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks! That matrix tutorial is even better than having he macro alone. FYI, I
need the macro for some ground cover experiments, probably resulting in another
memory-intensive macro :)
~Sam
Chris Huff wrote:
> In article <395A4421.D24D010F@aol.com>, STB### [at] aolcom wrote:
>
> > I thought the matrix transform was only good for skewing things.... Do you
> > use the normal vector somehow in the matrix transform? What does the
> > reorient macro do (and where can I find it)?
>
> http://users.erols.com/vansickl/macs.htm
>
> And while you are at it, you might want to check out his matrix tutorial:
> http://users.erols.com/vansickl/matrix.htm
>
> --
> Christopher James Huff - Personal e-mail: chr### [at] maccom
> TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
> Personal Web page: http://homepage.mac.com/chrishuff/
> TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
SamuelT wrote in message <395### [at] aolcom>...
>Thanks! That matrix tutorial is even better than having he macro alone.
FYI, I
>need the macro for some ground cover experiments, probably resulting in
another
>memory-intensive macro :)
You might want to look at the "vegetate" include file for reference:
http://www.geocities.com/rengaw03/povray.html
Mark
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
SamuelT <STB### [at] aolcom> wrote:
: I thought the matrix transform was only good for skewing things....
Matrix can do EVERYTHING! :)
"Unfortunately no-one can be told what the matrix is... You have to see
it for yourself." - Morpheus, The Matrix.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
>
> Matrix can do EVERYTHING! :)
>
Only *linear* transformations!
> "Unfortunately no-one can be told what the matrix is... You have to see
> it for yourself." - Morpheus, The Matrix.
>
"Don't try to bend the spoon, that's impossible, try to realize the obvious..."
;-)
Christoph
--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> "Unfortunately no-one can be told what the matrix is... You have to see
> it for yourself." - Morpheus, The Matrix.
"Do you think that's air you're breathing...?"
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |