|
|
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
|
|
|
|
> 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?
When an intersection test is done with an isosurface, by default only the
first intersection is found. In the area of your image with the missing
shadow, that first intersection (from the shadowed area towards the light
source) is inside the box{} which is differenced from the isosurface. Since
it's inside the box, the intersection doesn't count (because the object does
not exist there). However, since that was the first intersection, the
algorithm doesn't go on to find more intersections with the isosurface, so
it never sees the part which *should* cast a shadow.
Normally this is a helpful speedup, but in this case it's causing problems.
To force POV-Ray to look for more than one intersection, use the max_trace
keyword with an integer for how many intersections to find. In this case
max_trace 3 should work.
You can also use the all_intersections keyword which is essentially
"max_trace infinity".
This is explained in the documentation at the end of "3.4.4 Isosurface
Object".
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
|
|
Slime wrote:
>>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?
>[...}
> Normally this is a helpful speedup, but in this case it's causing problems.
> To force POV-Ray to look for more than one intersection, use the max_trace
> keyword with an integer for how many intersections to find. In this case
> max_trace 3 should work.
>
> You can also use the all_intersections keyword which is essentially
> "max_trace infinity".
>
> This is explained in the documentation at the end of "3.4.4 Isosurface
> Object".
all_intersections does the job. Thanks.
Post a reply to this message
|
|