|
![](/i/fill.gif) |
Thank you! That works very nicely. I still can't figure out what why the
SEO messes up.
"Tim Attwood" <tim### [at] worldnet att net> wrote in message
news:3B490638.D342FF02@worldnet.att.net...
> > I am tryting to create a difference between two Superquadric Ellipsoid
> > Objects. Whenever I do this the object has some odd cutouts that appear
at
> > certain angles. I will post the image example in the binaries/images
area.
> > Anything I can do to get the same object shape without the cutouts?
Here is
> > my questionable code...
>
> Well, that looks like the normal on some of the triangles got flipped
somewhere
> inside POV. You can get the same shape with a CSG, "rounded box". Here's
> some code, the first part is a RoundBox macro and the second your example
> rewritten to use it.
>
> // ----- RoundBox -----
> // LocA and LocB are box corners, Rad1 is the rounding radius
> #macro RoundBox(LocA, LocB, Rad1)
> merge {
> #local B1 = <LocA.x+Rad1,LocA.y+Rad1,LocA.z+Rad1>;
> #local B2 = <LocA.x+Rad1,LocA.y+Rad1,LocB.z-Rad1>;
> #local B3 = <LocB.x-Rad1,LocA.y+Rad1,LocB.z-Rad1>;
> #local B4 = <LocB.x-Rad1,LocA.y+Rad1,LocA.z+Rad1>;
> #local T1 = <LocA.x+Rad1,LocB.y-Rad1,LocA.z+Rad1>;
> #local T2 = <LocA.x+Rad1,LocB.y-Rad1,LocB.z-Rad1>;
> #local T3 = <LocB.x-Rad1,LocB.y-Rad1,LocB.z-Rad1>;
> #local T4 = <LocB.x-Rad1,LocB.y-Rad1,LocA.z+Rad1>;
> sphere{B1, Rad1}
> sphere{B2, Rad1}
> sphere{B3, Rad1}
> sphere{B4, Rad1}
> sphere{T1, Rad1}
> sphere{T2, Rad1}
> sphere{T3, Rad1}
> sphere{T4, Rad1}
> cylinder{B1, B2, Rad1}
> cylinder{B2, B3, Rad1}
> cylinder{B3, B4, Rad1}
> cylinder{B4, B1, Rad1}
> cylinder{T1, T2, Rad1}
> cylinder{T2, T3, Rad1}
> cylinder{T3, T4, Rad1}
> cylinder{T4, T1, Rad1}
> cylinder{T1, B1, Rad1}
> cylinder{T2, B2, Rad1}
> cylinder{T3, B3, Rad1}
> cylinder{T4, B4, Rad1}
> box{<B1.x,B1.y,LocA.z>,<T3.x,T3.y,LocB.z>}
> box{<LocA.x,B1.y,B1.z>,<LocB.x,T3.y,T3.z>}
> box{<B1.x,LocA.y,B1.z>,<T3.x,LocB.y,T3.z>}
> bounded_by{box{LocA,LocB}}
> }
> #end
> // ----- scene -----
> #version unofficial MegaPov 0.7;
> global_settings {
> assumed_gamma 2.2
> max_trace_level 25
> }
> light_source {< -500, 500, -500> color White * 1.0}
> camera { location <0,0,-3> look_at <0,0,0>}
>
> difference {
> object {RoundBox(<-1,-1,-1>,<1,1,1>,.5) scale <1.00,1.00,1.00>}
> object {RoundBox(<-1,-1,-1>,<1,1,1>,.5) scale <0.98,0.98,2.01>}
> scale <1,0.25,0.15>
> bounded_by{box{<-1,-.25,-.15>,<1,.25,.15>}}
> texture {pigment {Green} finish {ambient 0.4}}
> rotate <-90,0,90>
> rotate y * 45
> }
> sphere {<0,0,0> , 1300.0 texture {pigment { Gray90 }} hollow}
>
> --
> light_source{<-9,9,-9>rgb x+y+z}text{ttf"timrom.ttf" // timothyea
> "Tim Attwood".1,0 pigment{rgb x+y}translate<-2.7,-.3,5>}//
@worldnet.att.net
> sky_sphere {pigment{gradient y color_map{[.45 rgb<.2,.3,.2>][0.5 rgb
x+y+z]
> [0.55 rgb x+y][0.6 rgb x+.5*y][.7 rgb 0]}scale 2 translate -1}}
>
>
Post a reply to this message
|
![](/i/fill.gif) |