POV-Ray : Newsgroups : povray.binaries.images : well [49.7kb] Server Time
17 Nov 2024 18:18:17 EST (-0500)
  well [49.7kb] (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: marabou
Subject: well [49.7kb]
Date: 25 Jul 2002 14:39:41
Message: <3d4045e1@news.povray.org>
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'
well.jpg


 

From: Mike Williams
Subject: Re: well [49.7kb]
Date: 25 Jul 2002 15:15:04
Message: <4W9loOAw3EQ9Ewrj@econym.demon.co.uk>
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

From: Samuel Benge
Subject: Re: well [49.7kb]
Date: 25 Jul 2002 15:59:09
Message: <3D405884.80203@caltel.com>
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

From: Bonsai
Subject: Re: well [49.7kb]
Date: 26 Jul 2002 02:33:59
Message: <3D40ECCC.3020906@b0n541.net>
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

From: Alessandro Morelli
Subject: Re: well [49.7kb]
Date: 26 Jul 2002 04:12:14
Message: <4i02kuo73ft93c697vjjfdjsle4hbeu24m@4ax.com>
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

From: Bonsai
Subject: Re: well [49.7kb]
Date: 26 Jul 2002 05:22:53
Message: <3D411462.7000705@b0n541.net>
> 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

From: Alessandro Morelli
Subject: Re: well [49.7kb]
Date: 26 Jul 2002 09:41:36
Message: <b6k2ku4mdjjnjf4gtd0b16085tidkaqc3d@4ax.com>
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

From: Philippe Lhoste
Subject: Re: well [49.7kb]
Date: 26 Jul 2002 11:43:07
Message: <3d416e0b$1@news.povray.org>
"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

From: Samuel Benge
Subject: Re: well [49.7kb]
Date: 26 Jul 2002 11:55:02
Message: <3D4170D6.5020408@caltel.com>
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

From: Philippe Lhoste
Subject: Re: well [49.7kb]
Date: 26 Jul 2002 12:34:21
Message: <3d417a0d$1@news.povray.org>
"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

Goto Latest 10 Messages Next 5 Messages >>>

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