POV-Ray : Newsgroups : povray.binaries.images : trace function (5K) : trace function (5K) Server Time
19 Aug 2024 18:26:18 EDT (-0400)
  trace function (5K)  
From: sacrofts
Date: 27 Oct 2000 12:01:24
Message: <39f9a6d4@news.povray.org>
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


 

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