POV-Ray : Newsgroups : povray.newusers : Fill a space between objects? Server Time
26 Nov 2024 03:55:13 EST (-0500)
  Fill a space between objects? (Message 1 to 3 of 3)  
From: brandon
Subject: Fill a space between objects?
Date: 31 Oct 2004 19:00:00
Message: <web.41857bd38ec893ad70f077560@news.povray.org>
Is there a way to fill a void created by objects?

For instance,

I have borders made with primitive objects, with the shape defined by
different splines. They all touch end to end, creating an outline of some
irregular shape. Is there a way to fill in the void between these splines?

Would I have to use a prism (which I am comfortable with), or is there some
concept that I'm not aware of?

Here is a picture of what I'm trying to fill.
http://metawire.org/~nomel/povray/ninjastar.jpg

I want to fill in the area inside the ninja star, from y = -0.1 to 0.1

Thanks,
nomel


Post a reply to this message

From: Tom Melly
Subject: Re: Fill a space between objects?
Date: 1 Nov 2004 18:29:14
Message: <4186c6ca@news.povray.org>
"brandon" <moc.tibroni@drut backwards> wrote in message
news:web.41857bd38ec893ad70f077560@news.povray.org...
> Is there a way to fill a void created by objects?
>

Probably, but as the man said, "you don't want to get there from here".

The problem is that your void is really no different from any other unfilled
space in your scene, and your spline is no help in defining it. It's not
objectively contained by anything.

IMHO you would be better off using basic primitives and CSG to generate your
shape.

For example...

camera {
  location  <0.0, 0, -6.0>
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}


light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------


#declare Blade =
difference{
 intersection{
  union{
   cylinder{z*-0.1,z*0.1,1 scale<2.5,1,1>}
   cylinder{z*-0.1,z*0.1,1 scale<2.6,1.1,0.95> pigment{Red}}
  }
  box{<0,0,-0.2>,<-3,1.1,0.2>}
 }
 cylinder{z*-0.2,z*0.2, 1 scale<2.5,0.5,5> translate<-2.75,0,0>}
 cylinder{z*-0.2,z*0.2, 1 scale<2.5,0.5,5> translate<-2.75,0,0> rotate
z*270}
}

#declare Shiriken =
union{
#declare N=0;
#while(N<360)
 object{
  Blade
  rotate z*N
  pigment{Blue}
 }

 #declare N=N+90;
#end
}

object{Shiriken}


Post a reply to this message

From: Florian Brucker
Subject: Re: Fill a space between objects?
Date: 2 Nov 2004 14:57:19
Message: <4187e69f@news.povray.org>
> I have borders made with primitive objects, with the shape defined by
> different splines. They all touch end to end, creating an outline of some
> irregular shape. Is there a way to fill in the void between these splines?
Easiest way would propably be to convert all different splines into one 
closed spline and create a prism out of that spline.


HTH,
Florian
-- 
camera{look_at-y*10location<8,-3,-8>*10}#local a=0;#while(a<999)sphere{
#local _=.01*a-4.99;#local p=a*.01-5;#local c=.01*a-4.995;<sin(p*pi)*5p
*10pow(p,5)*.01>sin(c*c*c*.1)+1pigment{rgb 3}}#local a=a+1;#end
/******** http://www.torfbold.com ******** http://www.imp.org ********/


Post a reply to this message

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