POV-Ray : Newsgroups : povray.general : Slice in a Sphere Server Time
28 Nov 2024 19:45:06 EST (-0500)
  Slice in a Sphere (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Kaeru Gaman
Subject: Slice in a Sphere
Date: 5 Sep 2006 21:20:01
Message: <web.44fe2179d7310742f3b97af70@news.povray.org>
Hi (hope this is the correct newsgroup, if not, I'm sorry)

I just want to ask if anyone knows an easy method to cut a slice into a
sphere.
(or to display only a slice of a sphere)

I mean from pole to pole, meridian borders, a CSG solution.


of course it can be done with difference/intersection and rotating boxes.
but perhaps someone discovered a different, maybe easier way.


Post a reply to this message

From: Alain
Subject: Re: Slice in a Sphere
Date: 5 Sep 2006 23:11:46
Message: <44fe3c72@news.povray.org>
Kaeru Gaman nous apporta ses lumieres en ce 05/09/2006 21:17:
> Hi (hope this is the correct newsgroup, if not, I'm sorry)
> 
> I just want to ask if anyone knows an easy method to cut a slice into a
> sphere.
> (or to display only a slice of a sphere)
> 
> I mean from pole to pole, meridian borders, a CSG solution.
> 
> 
> of course it can be done with difference/intersection and rotating boxes.
> but perhaps someone discovered a different, maybe easier way.
> 
> 
> 
Intersection of the sphere and 2 box or 2 planes.

-- 
Alain
-------------------------------------------------
Utopianism: This shit does not stink.


Post a reply to this message

From: Tim Attwood
Subject: Re: Slice in a Sphere
Date: 6 Sep 2006 04:20:26
Message: <44fe84ca$1@news.povray.org>
> Intersection of the sphere and 2 box or 2 planes.
There's also Wedge(Angle) in shapes.inc, so

#include "shapes.inc"
difference{sphere{0,1}Wedge(330)pigment{Orange}}


Post a reply to this message

From: NEWS
Subject: Re: Slice in a Sphere
Date: 6 Sep 2006 08:02:25
Message: <44feb8d1@news.povray.org>
there some different maner:
The first one:

sphere {0*y,350  clipped_by { box {<500,-2,500>,<-500,2,-500>  //the
lice  }   }
This will show a slice of your sphere by neglecting side slide (will show
only part of the sphere that is inside the slice)

the second is a CSG intersection
intersection {
        sphere {0*y,350}
        box {<500,-2,500>,<-500,2,-500>  //the slice  }
}

This wil shopw you the 2 side surface you create by CSG ..(will show to
surface circle}






news:web.44fe2179d7310742f3b97af70@news.povray.org...
> Hi (hope this is the correct newsgroup, if not, I'm sorry)
>
> I just want to ask if anyone knows an easy method to cut a slice into a
> sphere.
> (or to display only a slice of a sphere)
>
> I mean from pole to pole, meridian borders, a CSG solution.
>
>
> of course it can be done with difference/intersection and rotating boxes.
> but perhaps someone discovered a different, maybe easier way.
>
>
>


Post a reply to this message

From: Penelope20k
Subject: Re: Slice in a Sphere
Date: 6 Sep 2006 08:09:47
Message: <44feba8b$1@news.povray.org>
The main advantage of clipped_by statement is that you dont get the surfacee
effect of the cutting section in an CSG operation.
So its the best thing to see inside of a sphere.







news:44feb8d1@news.povray.org...
> there some different maner:
> The first one:
>
> sphere {0*y,350  clipped_by { box {<500,-2,500>,<-500,2,-500>  //the
> lice  }   }
> This will show a slice of your sphere by neglecting side slide (will show
> only part of the sphere that is inside the slice)
>
> the second is a CSG intersection
> intersection {
>         sphere {0*y,350}
>         box {<500,-2,500>,<-500,2,-500>  //the slice  }
> }
>
> This wil shopw you the 2 side surface you create by CSG ..(will show to
> surface circle}
>
>
>
>
>

> news:web.44fe2179d7310742f3b97af70@news.povray.org...
> > Hi (hope this is the correct newsgroup, if not, I'm sorry)
> >
> > I just want to ask if anyone knows an easy method to cut a slice into a
> > sphere.
> > (or to display only a slice of a sphere)
> >
> > I mean from pole to pole, meridian borders, a CSG solution.
> >
> >
> > of course it can be done with difference/intersection and rotating
boxes.
> > but perhaps someone discovered a different, maybe easier way.
> >
> >
> >
>
>


Post a reply to this message

From: Warp
Subject: Re: Slice in a Sphere
Date: 6 Sep 2006 11:42:02
Message: <44feec4a@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> Intersection of the sphere and 2 box or 2 planes.

  I think that the problem is slightly more complicated than just that.

  If you want to cut a slice out of a sphere with 2 planes the operation
is different depending on whether the slice is less or more than 180
degrees. If it's less than 180 degrees then you have to calculate the
difference between the sphere and the intersection of the two planes.
If it's more than 180 degrees then you have to calculate the difference
between the sphere and the union of the two planes.

  Doing the same with boxes is actually needlessly more complicated,
so it's basically useless.

-- 
                                                          - Warp


Post a reply to this message

From: Kaeru Gaman
Subject: Re: Slice in a Sphere
Date: 6 Sep 2006 19:40:01
Message: <web.44ff5be61500a34cff8999360@news.povray.org>
thnx for your answers.

I didn't know the Wedge so far, so I will have a look at it.

actually, I need a solid sphere, but not a look at the sliced area,
so it would not matter is clipped_by or not.

@Alain:


but I don't get the point with the planes.
afaik is plane an infinite object with no thickness,
so how should it interact in an difference or intersection?
(maybe it's different meanwhile, I started with POV3.0)

the solution with the two boxes is what I already thougth of.

my aim is a kind of "clock" for a game, wich is a sliced sphere getting
smaller and smaller, representing the hand of a clock.
so I need an every-degree-solution, but not really a look on the cuts or
inside the sphere.


Post a reply to this message

From: Warp
Subject: Re: Slice in a Sphere
Date: 6 Sep 2006 20:20:14
Message: <44ff65be@news.povray.org>
Kaeru Gaman <nomail@nomail> wrote:
> afaik is plane an infinite object with no thickness,

  No, a plane is an infinite object with infinite thickness. The inside
of the plane is the side opposite to its normal vector.

-- 
                                                          - Warp


Post a reply to this message

From: Kaeru Gaman
Subject: Re: Slice in a Sphere
Date: 6 Sep 2006 22:40:01
Message: <web.44ff855f1500a34cff8999360@news.povray.org>
hey cool, good to know that I can do classic CSG with a plane.

is the resulting object finite?
I mean, just like i did it with only simple shapes
intersection/defference...?


Post a reply to this message

From: Tim Attwood
Subject: Re: Slice in a Sphere
Date: 7 Sep 2006 03:46:59
Message: <44ffce73$1@news.povray.org>
> is the resulting object finite?
> I mean, just like i did it with only simple shapes
> intersection/defference...?

It can be either depending...
Think of removing a sphere from a plane, in
that case you might get something like a crater
in a plane... that would be infinite...
difference{plane{...}sphere{...} }

But if you remove a plane from a sphere, the
shape would be a sphere with a flat spot...
which would be finite...
difference{sphere{...}plane{...}}

Sometimes people prefer to use boxes instead
of planes. This has a little better performance,
timewise, because the bounding on the boxes is
finite. In most cases though it's just a matter of
preference.

The Wedge(angle) macro is perfect for what you
want. Just use Wedge(360*clock), remember you
want a wedge that removes the part of the sphere
you don't want. Then just rotate it -90*x to face
the camera. Then after you are happy with the
placement use an animation to make your sequence
of images.

In povray animation is controlled from ini files. For
example if you add the lines...

[640x480, AA0, 360 frame anim]
Width=640
Height=480
Antialias=Off
Initial_Frame = 1
Final_Frame = 360

to the end of quickres.ini, then close and re-run
the POV editor in the windows version, then you can
choose this setting in the resolution list to run 360
frame animations. The clock is a system variable that
starts at 0 in the first frame and varies up to 1 in the
final frame. That way if you decide to have a different
number of frames the objects will still vary thru their
full range of motion.

There's a lot of detail about this in the help files.


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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