|
![](/i/fill.gif) |
Hi,
can somebody help me understand what's going on? I thought I understood
the trace function to mean that where the test-ray intersects the object
being tested, it returns the coordinates of that point. I'm not sure
why my code produces this result though.
Steve
---code
#version unofficial megapov 0.6;
camera {location<0,0,7> look_at 0}
light_source {100 rgb 1}
background {rgb <0,0,0.8>}
#declare Mycyl = cylinder { <0, -3, 0>,<0,3,0>, 2 }
#declare Norm = <0, 0, 0>;
#declare Start = <5,0,0>;
#declare End = <-5,-3,0>;
#declare Inter= trace ( Mycyl, Start, End, Norm);
cylinder {Start,End,0.05 pigment {green 1}}
object {
Mycyl
texture {
pigment { rgbt <1,1,1,0.5>}
}
}
#if (Norm.x != 0 | Norm.y != 0 | Norm.z != 0)
cylinder {
Inter, Inter+Norm, .2
texture {
pigment {color red 1}
}
}
#end
---image
Post a reply to this message
Attachments:
Download 'testz.jpg' (6 KB)
Preview of image 'testz.jpg'
![testz.jpg](/povray.binaries.images/attachment/%3C39f9a6d4%40news.povray.org%3E/testz.jpg?ttop=443840&toff=11700&preview=1)
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
sacrofts wrote:
> #declare Mycyl = cylinder { <0, -3, 0>,<0,3,0>, 2 }
> #declare Norm = <0, 0, 0>;
> #declare Start = <5,0,0>;
> #declare End = <-5,-3,0>;
> #declare Inter= trace ( Mycyl, Start, End, Norm);
IIRC, the third parameter should be a direction, not a point to shoot towards. Instead
of getting the point where the line form Start to End intersects the cylinder, you're
getting the point for the line Start to (Start+End).
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
![](/i/fill.gif) |