POV-Ray : Newsgroups : povray.newusers : Cut a sphere Server Time
1 Nov 2024 13:20:18 EDT (-0400)
  Cut a sphere (Message 1 to 6 of 6)  
From: Oleguer Vilella
Subject: Cut a sphere
Date: 31 Jul 2005 09:34:32
Message: <42ecd368$1@news.povray.org>
Hi all,

I've done this object:
======================================
merge{
    sphere { <0, 0, 0>, 1
      translate -0.5*x
    }
    sphere { <0, 0, 0>, 0.5
      translate 0.5*x
    scale <1.5, 0, 0>
    }
    pigment { rgbf <0.9, 0.9, 0.9, 1> }
    rotate <0, 0, 0>
translate <0, 0, 0>
scale 5

clipped_by { plane { z, 0 }

}}
======================================
And I want to cut it, to do it I used a "clipped_by" with a plane, but I 
think I'm wrong.

I want to cut the object and then I want to put objects inside. So, I want 
to have it "empty". I don't know if the method that I'm using will work 
properly.

All helps will be welcome.

Regards,
Oleguer


Post a reply to this message

From: Oleguer Vilella
Subject: Re: Cut a sphere
Date: 31 Jul 2005 10:05:42
Message: <42ecdab6@news.povray.org>
Maybe something like this?
======================================
merge{
sphere { <0, 0, 0>, 1
translate -0.5*x
}
sphere { <0, 0, 0>, 0.5
translate 0.5*x
scale <1.32, 0, 0>
}
pigment { rgbf <0.9, 0.9, 0.9, 1> }
rotate <0, 0, 0>
translate <0, 0, 0>
scale 5

clipped_by { plane { y, 4 } }
hollow on
interior_texture { pigment { rgbf <.9, .9, .9, 0.8> } }
}
======================================


Regards,
Oleguer





news:42ecd368$1@news.povray.org...
> Hi all,
>
> I've done this object:
> ======================================
> merge{
>    sphere { <0, 0, 0>, 1
>      translate -0.5*x
>    }
>    sphere { <0, 0, 0>, 0.5
>      translate 0.5*x
>    scale <1.5, 0, 0>
>    }
>    pigment { rgbf <0.9, 0.9, 0.9, 1> }
>    rotate <0, 0, 0>
> translate <0, 0, 0>
> scale 5
>
> clipped_by { plane { z, 0 }
>
> }}
> ======================================
> And I want to cut it, to do it I used a "clipped_by" with a plane, but I 
> think I'm wrong.
>
> I want to cut the object and then I want to put objects inside. So, I want 
> to have it "empty". I don't know if the method that I'm using will work 
> properly.
>
> All helps will be welcome.
>
> Regards,
> Oleguer
>


Post a reply to this message

From: Alain
Subject: Re: Cut a sphere
Date: 31 Jul 2005 14:53:22
Message: <42ed1e22@news.povray.org>
Oleguer Vilella nous apporta ses lumieres en ce 2005-07-31 08:32:
> Hi all,
> 
> I've done this object:
> ======================================
> merge{
>     sphere { <0, 0, 0>, 1
>       translate -0.5*x
>     }
>     sphere { <0, 0, 0>, 0.5
>       translate 0.5*x
>     scale <1.5, 0, 0>
>     }
>     pigment { rgbf <0.9, 0.9, 0.9, 1> }
>     rotate <0, 0, 0>
> translate <0, 0, 0>
> scale 5
> 
> clipped_by { plane { z, 0 }
> 
> }}
> ======================================
> And I want to cut it, to do it I used a "clipped_by" with a plane, but I 
> think I'm wrong.
> 
> I want to cut the object and then I want to put objects inside. So, I want 
> to have it "empty". I don't know if the method that I'm using will work 
> properly.
> 
> All helps will be welcome.
> 
> Regards,
> Oleguer 
> 
> 
As it is, it "looks" empty, if you put some rotation to the whole object, after the
clipped_by. 
Removing the filter and using interior_texture shows that clearly, but it have NO
thickness.
What I'd do is this:
difference{
	merge{sphere{0,1 translate -0.5*x}//0,1 = <0,0,0>,1
		sphere{0,0.5 translate 0.5*x scale<1.5,1,1>}//get rid of warning about scaling by 0
		}//exterior part
	sphere{0,0.9 translate -0.5*x}//change the 0.9 and 0.4 to set the thickness of the
side
	sphere{0,0.4 translate 0.5*x scale<1.5,1,1>}//iner "hollow"
	box{<-2,2,0>,<2,-2,-2>}//cut away unneded part
	pigment{rgbt 1}// no surface colour
	interior{ior 1.5 //glass, optionaly add some dispersion, but very subtle effect
		fade_color rgb 0.9//make the material coloured in it's mass
		fade_distance 0.1//adjust to your taste
		fade_power 1001//use exponential fading
		}
	}

Alain


Post a reply to this message

From: Oleguer Vilella
Subject: Re: Cut a sphere
Date: 31 Jul 2005 15:12:39
Message: <42ed22a7$1@news.povray.org>
Hi Alain,

Yeah, you've used a box instead of a plane. Why?

Regards,
Oleguer





news:42ed1e22@news.povray.org...
> Oleguer Vilella nous apporta ses lumieres en ce 2005-07-31 08:32:
>> Hi all,
>>
>> I've done this object:
>> ======================================
>> merge{
>>     sphere { <0, 0, 0>, 1
>>       translate -0.5*x
>>     }
>>     sphere { <0, 0, 0>, 0.5
>>       translate 0.5*x
>>     scale <1.5, 0, 0>
>>     }
>>     pigment { rgbf <0.9, 0.9, 0.9, 1> }
>>     rotate <0, 0, 0>
>> translate <0, 0, 0>
>> scale 5
>>
>> clipped_by { plane { z, 0 }
>>
>> }}
>> ======================================
>> And I want to cut it, to do it I used a "clipped_by" with a plane, but I 
>> think I'm wrong.
>>
>> I want to cut the object and then I want to put objects inside. So, I 
>> want to have it "empty". I don't know if the method that I'm using will 
>> work properly.
>>
>> All helps will be welcome.
>>
>> Regards,
>> Oleguer
> As it is, it "looks" empty, if you put some rotation to the whole object, 
> after the clipped_by. Removing the filter and using interior_texture shows 
> that clearly, but it have NO thickness.
> What I'd do is this:
> difference{
> merge{sphere{0,1 translate -0.5*x}//0,1 = <0,0,0>,1
> sphere{0,0.5 translate 0.5*x scale<1.5,1,1>}//get rid of warning about 
> scaling by 0
> }//exterior part
> sphere{0,0.9 translate -0.5*x}//change the 0.9 and 0.4 to set the 
> thickness of the side
> sphere{0,0.4 translate 0.5*x scale<1.5,1,1>}//iner "hollow"
> box{<-2,2,0>,<2,-2,-2>}//cut away unneded part
> pigment{rgbt 1}// no surface colour
> interior{ior 1.5 //glass, optionaly add some dispersion, but very subtle 
> effect
> fade_color rgb 0.9//make the material coloured in it's mass
> fade_distance 0.1//adjust to your taste
> fade_power 1001//use exponential fading
> }
> }
>
> Alain


Post a reply to this message

From: Alain
Subject: Re: Cut a sphere
Date: 31 Jul 2005 22:09:06
Message: <42ed8442$1@news.povray.org>
Oleguer Vilella nous apporta ses lumieres en ce 2005-07-31 14:10:
> Hi Alain,
> 
> Yeah, you've used a box instead of a plane. Why?
> 
> Regards,
> Oleguer
> 
I tend to use a box when doing difference, I could use a plane{-z,0} and get the same
result. I 
could also have used an intersection with a plane{z,0} or a box extending the other
way as in my sample.

Alain


Post a reply to this message

From: Oleguer Vilella
Subject: Re: Cut a sphere
Date: 1 Aug 2005 02:14:14
Message: <42edbdb6@news.povray.org>
Yeah, all right.

Thanks,
Oleguer



news:42ed8442$1@news.povray.org...
> Oleguer Vilella nous apporta ses lumieres en ce 2005-07-31 14:10:
>> Hi Alain,
>>
>> Yeah, you've used a box instead of a plane. Why?
>>
>> Regards,
>> Oleguer
>>
> I tend to use a box when doing difference, I could use a plane{-z,0} and 
> get the same result. I could also have used an intersection with a 
> plane{z,0} or a box extending the other way as in my sample.
>
> Alain


Post a reply to this message

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