POV-Ray : Newsgroups : povray.general : Slice in a Sphere Server Time
1 Aug 2024 00:20:09 EDT (-0400)
  Slice in a Sphere (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
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

From: Stephen
Subject: Re: Slice in a Sphere
Date: 7 Sep 2006 17:02:11
Message: <0621g25ruftikuj61kj3vhpvi1f3467cv5@4ax.com>
On Wed,  6 Sep 2006 19:38:14 EDT, "Kaeru Gaman" <nomail@nomail> wrote:

>
>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.

If you are looking for a kind of clock you could use a disk with a
radial pigment that has part of the colour map transparent. I know
that it is 2D not 3D but you might find it useful. I'll post an
example in p.b.a. Ii it not what you said you wanted but a variation
and the principle is there. It looks like a radar sweep.

Regards
	Stephen


Post a reply to this message

From: Kaeru Gaman
Subject: Re: Slice in a Sphere
Date: 8 Sep 2006 01:10:00
Message: <web.4500fabf1500a34c3c5a7f00@news.povray.org>
thanx a lot for all your help.

the wedge is a good element.
may I use it in commercial projects, or is it one of that samples that are
not free?

I also learned some new about the plane. thnx for that, too.

I already knew about the clock and the animation-INI, but I appreciate your
effords.

stay healthy and have fun
best regards
Kaeru Gaman


Post a reply to this message

From: Tim Attwood
Subject: Re: Slice in a Sphere
Date: 8 Sep 2006 04:23:25
Message: <4501287d$1@news.povray.org>
> may I use it in commercial projects, or is it one of that samples that are
> not free?

It's one of the standard include files, all the standard includes are
free to use.


Post a reply to this message

From: Kaeru Gaman
Subject: Re: Slice in a Sphere
Date: 11 Sep 2006 20:55:01
Message: <web.4506052b1500a34c7e66db80@news.povray.org>
Stephen <mcavoysATaolDOTcom@> wrote:
> I'll post an example in p.b.a.

ahm.. sorry.. where can I find it?

it's not exactly what I was looking for, but sounds useful...


Post a reply to this message

From: Alain
Subject: Re: Slice in a Sphere
Date: 12 Sep 2006 18:40:01
Message: <45073741@news.povray.org>
Kaeru Gaman nous apporta ses lumieres en ce 11/09/2006 20:54:
> Stephen <mcavoysATaolDOTcom@> wrote:
>> I'll post an example in p.b.a.
> 
> ahm.. sorry.. where can I find it?
> 
> it's not exactly what I was looking for, but sounds useful...
> 
> 
povray.binaries.animation

-- 
Alain
-------------------------------------------------
AI programmers only think they do it


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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