|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Povray-experts,
I have a little problem when doing a difference operation between two
objects. The first one is a sphere which I want to "cut" with a box. The
result should be solid sphere again with one flat side. When using the
script below, Povray performs the cutting but the sphere is not solid
anymore and looks like a hollow object. Is there an easy way to close the
sphere again or should I try something totally different?
Thanks for your ideas!
Regards,
Alex
My script:
#include "colors.inc"
background {White}
camera {angle 15 location <0, -50, -50> look_at <0, 0, 0>}
light_source {<0, 0, -50> color White}
light_source {<0, -20, -20> color White}
difference
{
blob
{
threshold 0.001
sphere
{
<0.130883, -0.495058, 0.751857>, 1.287408, 1
pigment
{
color CHSV2RGB(<240.000000, 0.300000, 1.000000>)
}
}
finish {phong 1}
}
box
{
<10, 10, 0>, <-10, -10, -5>
texture
{
pigment
{
color Yellow
transmit 1.0
}
}
}
}
_________________________________
Ale### [at] gmxde
http://www.it99.org/axl
+49 (0) 1 75/ 410 72 68
ICQ# 36765668
_________________________________
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alexander,
The texture of the surface of the difference is taken from the subtracted
object. In your case the subtracted block is transparant (transmit 1.0),
which makes the cutting edge transparant.
Remove the "transmit 1.0"-line and see what happens. Then adjust the texture
of the block to your desire.
(See tutorial 3.3.4 CSG Difference)
Good luck,
XiRay
INVALID_ADDRESS wrote:
>Hi Povray-experts,
>
>I have a little problem when doing a difference operation between two
>objects. The first one is a sphere which I want to "cut" with a box. The
>result should be solid sphere again with one flat side. When using the
>script below, Povray performs the cutting but the sphere is not solid
>anymore and looks like a hollow object. Is there an easy way to close the
>sphere again or should I try something totally different?
>
>Thanks for your ideas!
>
>Regards,
>
>Alex
>
>
>My script:
>#include "colors.inc"
>
>background {White}
>
>camera {angle 15 location <0, -50, -50> look_at <0, 0, 0>}
>
>light_source {<0, 0, -50> color White}
>light_source {<0, -20, -20> color White}
>
>difference
>{
> blob
> {
> threshold 0.001
> sphere
> {
> <0.130883, -0.495058, 0.751857>, 1.287408, 1
> pigment
> {
> color CHSV2RGB(<240.000000, 0.300000, 1.000000>)
> }
> }
> finish {phong 1}
> }
> box
> {
> <10, 10, 0>, <-10, -10, -5>
> texture
> {
> pigment
> {
> color Yellow
> transmit 1.0
> }
> }
> }
>}
>
>_________________________________
>
>Ale### [at] gmxde
>http://www.it99.org/axl
>+49 (0) 1 75/ 410 72 68
>ICQ# 36765668
>_________________________________
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi XiRay,
I tested my script without the transmit and the color adjusted to the
sphere's color - and now the cutting edge is like desired.
There's another problem that I encounter: In the example there is just one
sphere (colored in blue) that will be substracted with the box. In "real
life" I would like to cut a number of different colored spheres with one box
(which also should have only one color). I am interested in a solution that
makes life easy for me, if possible. Is there maybe a way to define
something in the sphere that it has an interior color?
Regards,
Alex
PS: Do you know why POV-Ray's web-newsgroups alway shows "INVALID_ADDRESS"
instead of my e-mail address?
"XiRay" <nomail@nomail> schrieb im Newsbeitrag
news:web.3e6795cecabb8c891e648b2c0@news.povray.org...
| Alexander,
|
| The texture of the surface of the difference is taken from the subtracted
| object. In your case the subtracted block is transparant (transmit 1.0),
| which makes the cutting edge transparant.
| Remove the "transmit 1.0"-line and see what happens. Then adjust the
texture
| of the block to your desire.
|
| (See tutorial 3.3.4 CSG Difference)
|
| Good luck,
| XiRay
|
|
| INVALID_ADDRESS wrote:
| >Hi Povray-experts,
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> In "real
> life" I would like to cut a number of different colored spheres with one box
> (which also should have only one color).
Look for "cutaway textures" in the documentation. That's the solution
you are looking for.
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3e678700@news.povray.org>,
> I have a little problem when doing a difference operation between two
> objects. The first one is a sphere which I want to "cut" with a box. The
> result should be solid sphere again with one flat side. When using the
> script below, Povray performs the cutting but the sphere is not solid
> anymore and looks like a hollow object. Is there an easy way to close the
> sphere again or should I try something totally different?
This is the wrong group for this kind of question. It would fit better
in povray.newusers, povray.programming is for messages that have to do
with programming, specifically when dealing with the POV-Ray source code
or some related subject.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|