POV-Ray : Newsgroups : povray.newusers : strange behaviour of difference function : strange behaviour of difference function Server Time
30 Jul 2024 06:18:39 EDT (-0400)
  strange behaviour of difference function  
From: Maurice
Date: 12 Sep 2004 14:57:37
Message: <41449c21$1@news.povray.org>
Hi

Please refer to the image posted in p.b.images in the thread with the 
same subject.

To get that image I have declared an object called spring, as given below.

I then draw the spring simply with object{spring}
Please notice that there is a part of the object's shadow missing.
Question 1 is: where did it go?
Question 2 is: how to get this fixed?

The difference with the box is needed to get a nice blunt end on the 
spring.

---8<---

#declare spring=
difference{
   isosurface{
   	// f_helix1(x,y,z, P0, P1, P2, P3, P4, P5, P6)
	  //
		// P0 : Number of helixes - e.g. 2 for a double helix
		// P1 : Period - is related to the number of turns per unit length
		// P2 : Minor radius (major radius > minor radius)
		// P3 : Major radius
		// P4 : Shape parameter. If this is greater than 1 then the tube 
becomes fatter in the y direction
		// P5 : Cross section type
		// P6 : Cross section rotation angle (degrees)
     function{
      f_helix1(x,y,z, 1, 1.5, wire_r, 4*bead_size, 1, 1, 0)
     }
 
contained_by{box{<-5*bead_size,-.3,-5*bead_size>,<5*bead_size,8*bead_size,5*bead_size>}}
     texture{RedWire_T}
   }
   box{
   	<-5*bead_size,-1,-5*bead_size>,
   	<0,1,0>
   	texture{RedWire_T}
   }
}

-- 
Maurice


Post a reply to this message

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