|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
on disk i found a piece of a scene i made long time ago. it is a macro
which makes a floor, a wall and a well. the well part of macro is buggy as
everyone can see. that is because i have no solution for the question: on a
defined stone and a nearly given radius how many complete stones can be
positioned to fill a circle and how great is radius then? is there a
formular i can use? for help i would be appreciated. for comments on the
pic, too.
Post a reply to this message
Attachments:
Download 'well.jpg' (50 KB)
Preview of image 'well.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it marabou who wrote:
>
>on disk i found a piece of a scene i made long time ago. it is a macro
>which makes a floor, a wall and a well. the well part of macro is buggy as
>everyone can see. that is because i have no solution for the question: on a
>defined stone and a nearly given radius how many complete stones can be
>positioned to fill a circle and how great is radius then? is there a
>formular i can use? for help i would be appreciated.
I'd attack it like this:
The interior faces of the bricks form a regular N-gon with the side
equal to the length of the brick. Determine the sizes of regular N-gons
with unit size and pick the one that most nearly matches the given
radius.
Let's call the distance from the centre of the circle to the midpoint of
an edge "R". (It's not a true radius, particularly in cases where N is
odd).
We know that the sum of the angles at the centre is 2*Pi, and that the
N-gon is regular, so each edge subtends an angle of 2*Pi/N at the
centre.
Lets draw a right angled triangle connecting the centre of the circle,
the centre of an edge and an adjacent vertex. We can see that the angle
at the centre is Pi/N, and it's tangent is 0.5/R (opposite over
adjacent), so
tan(pi/N) = 0.5/R
i.e.
R = 1/(2*tan(pi/N))
So
#declare N=3;
#while (1/(2*tan(pi/N)) < given_radius)
#declare N=N+1;
#end
#declare R = 1/(2*tan(pi/N));
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
marabou wrote:
> on a
> defined stone and a nearly given radius how many complete stones can be
> positioned to fill a circle and how great is radius then? is there a
> formular i can use?
Hello Marabou. Here is some code for you. I tested and re-tested this
code and it works great. Note, Radius must be a multiple of Scale. For
example if Scale is 4, then Radius must be 4, 8, 12, 16, etc. Here is
the code (I added a camera and light_source for convenience):
camera{location<0,40,-40>
look_at 0
angle 35
}
light_source{
<2,1,-.5>*100000
,<1.5 1.45 1.25>*1.7
}
#declare Scale=1;
#declare Radius=10;
#declare RotateV=0;
#while(RotateV<360)
superellipsoid{<.2,.2>
pigment{rgb 1}
scale< Scale, Scale/2, Scale/2 >
translate z*Radius
rotate y*RotateV
}
#local RotateV = RotateV+360/Radius/3*Scale;
#end
--
Samuel Benge
sbe### [at] caltelcom
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
marabou schrieb:
> that is because i have no solution for the question: on a
> defined stone and a nearly given radius how many complete stones can be
> positioned to fill a circle and how great is radius then? is there a
> formular i can use?
I used some formulas in my arch macro. It can do circles too. Just have
a look at:
http://www.b0n541.net/povray/povmacro.html
I hope the comments in the code are not to confusing...
So long,
Bonsai
--
<--------------------------->
___ __ __ _ ___ ___ _
| _ ) \ \( ) _) _ )( )
| _ \() |\ \ |\ \/ _ \| |
|___/__/_)\__)___)/ \_)_)
www.b0n541.net
<--------------------------->
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 25 Jul 2002 20:40:53 +0200, marabou <not### [at] availablenet> wrote:
>
>on disk i found a piece of a scene i made long time ago. it is a macro
>which makes a floor, a wall and a well. the well part of macro is buggy as
>everyone can see. that is because i have no solution for the question: on a
>defined stone and a nearly given radius how many complete stones can be
>positioned to fill a circle and how great is radius then? is there a
>formular i can use? for help i would be appreciated. for comments on the
>pic, too.
Hi,
I found an interesting article in the SIGGRAPH'90 proceedings which
might interest you ("A Method of Generating Stone Wall Patterns" by
Kazunori Miyata), which coupled to this ("Feature-Based Cellular
Texturing for Architectural Models" by Justin Legakis, Julie Dorsey
and Steven Gortler, SIGGRAPH'01) should let build the most complex
stone designs.
I hope it helps,
Alex
P.S.: If you want i'll e-mail you the articles in PDF form.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> P.S.: If you want i'll e-mail you the articles in PDF form.
I'm also interested. Is it possible to send them to me too.
Thanks in advance...
Bonsai
--
<--------------------------->
___ __ __ _ ___ ___ _
| _ ) \ \( ) _) _ )( )
| _ \() |\ \ |\ \/ _ \| |
|___/__/_)\__)___)/ \_)_)
www.b0n541.net
<--------------------------->
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
They're up for grabbers on http://www.alphac.it/pov
Or, more accurately, they'll be in a minute or so...they're around 9
megs in size.
Peace and POV,
Alex
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Samuel Benge" <sbe### [at] caltelcom> wrote:
> marabou wrote:
>
> > on a
> > defined stone and a nearly given radius how many complete stones can be
> > positioned to fill a circle and how great is radius then? is there a
> > formular i can use?
>
>
> Hello Marabou. Here is some code for you. I tested and re-tested this
> code and it works great. Note, Radius must be a multiple of Scale. For
> example if Scale is 4, then Radius must be 4, 8, 12, 16, etc. Here is
> the code (I added a camera and light_source for convenience):
>
> camera{location<0,40,-40>
> look_at 0
> angle 35
> }
>
> light_source{
> <2,1,-.5>*100000
> ,<1.5 1.45 1.25>*1.7
> }
>
> #declare Scale=1;
> #declare Radius=10;
> #declare RotateV=0;
> #while(RotateV<360)
> superellipsoid{<.2,.2>
> pigment{rgb 1}
> scale< Scale, Scale/2, Scale/2 >
> translate z*Radius
> rotate y*RotateV
> }
> #local RotateV = RotateV+360/Radius/3*Scale;
> #end
#declare Scale=3.2;
Same problem :-(
Regards.
-- #=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=# --
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hmm, radius can be 3.2, 6.4, 12.8, 25.6, etc....
I guess you don't want to use a decimal radius?
Philippe Lhoste wrote:
>
> #declare Scale=3.2;
>
> Same problem :-(
>
> Regards.
--
Samuel Benge
sbe### [at] caltelcom
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Samuel Benge" <sbe### [at] caltelcom> wrote:
> Hmm, radius can be 3.2, 6.4, 12.8, 25.6, etc....
>
> I guess you don't want to use a decimal radius?
>
> Philippe Lhoste wrote:
>
> >
> > #declare Scale=3.2;
> >
> > Same problem :-(
> >
> > Regards.
Oh well, as usual, problem between keyboard and chair...
I didn't read your note about the relationship between radius and scale.
I added it as a comment in your code snippet.
Thank you for this useful piece of code.
-- #=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=# --
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |