|
 |
Yes, I use the cylinder/torus difference trick for other things as well.
Very useful. Check out the solder joints on some parts here- also done with the
cylinder/torus difference.
Cheers!
Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip
Post a reply to this message
Attachments:
Download 'Parts4.jpg' (21 KB)
Preview of image 'Parts4.jpg'

|
 |
|
 |
> Yes, I use the cylinder/torus difference trick for other things as well.
Well, where would we be without it. Couldn't do much neoclassical
architechture without it :)
It does have it's problems, however. If you combine it with an concave
shape like on the attached image (code below), the shading looks
strange. I don't know if it is a problem with pov's shading model, or I
just have wrong expectations to how a shape like this should look, but I
don't think it looks right.
/Ib
--- code start ---
camera {
location <0, 10, -100>
angle 30
look_at <0, 10, 0 >
}
light_source { <0, 500, -250>, colour White*2}
union {
sphere { <0, 10, 0>, 10 }
difference {
cylinder { <0, 0, 0>, <0, 10, 0>, 20 }
torus { 20, 10 translate <0, 10, 0> }
}
texture { pigment { Gray50 } finish { Phong_Shiny } }
}
--- code end ---
Post a reply to this message
Attachments:
Download 'testshading.jpg' (5 KB)
Preview of image 'testshading.jpg'

|
 |
|
 |
Hey, you're right! Perhaps we could use a slightly different sized sphere-
like just a hair larger- and move it downward a bit to compensate so the
intersection is the proper size? It would be a real pain, but it could be
tried.
Cheers!
Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip
Post a reply to this message
|
 |
|
 |
Sir Charles W. Shults III wrote:
> Hey, you're right! Perhaps we could use a slightly different sized sphere-
> like just a hair larger- and move it downward a bit to compensate so the
> intersection is the proper size? It would be a real pain, but it could be
> tried.
It helps, but it takes more than a hair to get rid of the effect.
The attached image shows this variant:
union {
sphere { <0, 7.1645, 0>, 10.2 }
difference {
cylinder { <0, 0, 0>, <0, 8.5963, 0>, 20 }
torus { 20, 10 translate <0, 10, 0> }
}
texture { pigment { Gray50 } finish { Phong_Shiny } }
}
/ib
Post a reply to this message
Attachments:
Download 'testshade2.jpg' (5 KB)
Preview of image 'testshade2.jpg'

|
 |