|
|
Program ended abnormally on 26/04/2004 07:07, Due to a catastrophic lars petter
error:
> Hi. I've got this difference object:
>
> difference { // a cylinder subtracted with another cylinder with smaller
> radius -> a ring
>
> cylinder {
> <5, 0, 5>,
> <5, 1, 5>,
> 1
> pigment { rgb <1, 0, 0> }
> }
>
> cylinder {
> <5, 0, 5>,
> <5, 1, 5>,
> 0.9
> open
> }
> //scale <2,1,1> is this the right place to insert the scaling?
>
> }
>
> if i try to scale it in x- or z- direction, the object simply fails to show
> in the render. scaling i y-direction however, works fine.
>
> why is this?
>
Others have already explained why.
You also have the problem of coincident surfaces as the ends of your first and
second cylinders are at the same place you should do:
difference {
cylinder { <0,0,0>, <0,1,0>, 1 }
cylinder { <0,-1,0>, <0,2,0>, 0.9 }
scale <2,1,1>
translate <5,0,5>
pigment { rgb <1, 0, 0> }
}
This way, you will be certain that you object looks like a tube and does not
have artifacts at the ends.
Secondly, you put the pigment on your first cylinder only. This makes the
second one have the "default" texture (black by default), so the inside of your
tube would be black, not red. If you want the whole tube to be red, move the
pigment to the end of the difference block, like I did above.
--
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/* videotron.ca */}camera{orthographic location<6,1.25,-6>look_at a }
Post a reply to this message
|
|