|
![](/i/fill.gif) |
"Chris B" <nom### [at] nomail com> wrote in message
news:48c3b143$1@news.povray.org...
>
> "Thomas de Groot" <t.d### [at] inter nlDOTnet> wrote in message
> news:48c3964b@news.povray.org...
>> Once in a while I try to solve this puzzle, but I give up. It is beyond
>> my skills.
>>
>> How would one model this pavement in POV-Ray? It looks simpler than it is
>> as - obviously - the inner arc of a row of stones is smaller than the
>> outer arc. In RL (as on the examples below) this is constantly
>> compensated I suppose to keep the pattern regular and symmetrical....
>>
>
> I would think that the key distances of any significance in the sample
> picture you posted are the radius of the outer edge of an arc and the
> centre to centre distance. In your image I would think that the stick is
> used to keep the outer radius constant and that the strings keep the
> centre to centre distance constant (and, in this instance the lines
> straight). The radius of the inner edge is already set by the previous arc
> of stones and would be used only as a guide to pick a block of the right
> depth.
>
> To get a good join, the tangent to one arc should pass through the centre
> of the other arc (and visa versa) so that you get a right angle at the
> joins and you can use a square block there to give a perfect join. This
> means that the centre to centre distance would have to be the Radius times
> the square root of 2.
>
> Regards,
> Chris B.
Below is a simple POV-Ray encapsulation of this. There are lots of things
you can play with, like bringing the corners in towards their centres to
give a mortar gap and randomising the size and shape a little etc. This
example uses a stone of a uniform width (BlockDepth*0.8) and you can
probably get a better looking result by reducing the width a little at the
outer edges and increasing it at the centre, but this complicates the
algorithm a little more.
Regards,
Chris B.
camera {location <0,2.2,1.1> look_at 1.2*z }
light_source {<-10,20,50>, rgb 4}
#include "math.inc"
#declare Radius = 1;
#declare BlockDepth = 0.1;
#local CentreToCentre = Radius*sqrt(2);
// Find the total length of an outer arc
#local ArcLength = 2*pi*Radius/4;
// Calculate the arc angle taken up by each block
#local BlocksPerArc = int(ArcLength/(BlockDepth*0.8));
#local BlockAngle = 90/BlocksPerArc;
#local RandomSeed = seed(1);
// Macro to draw a row of blocks
#macro RowOfBlocks ()
#local Angle = 0;
#local BlockCounter = 0;
#while (BlockCounter < BlocksPerArc)
#local TopLeft = vrotate(Radius*z,y*(-45+Angle));
#local TopRight = vrotate(Radius*z,y*(-45+Angle+BlockAngle));
// Find the inner arc positions by moving the top points back in towards
the centre
// Note. This uses a little approximation.
#local BottomLeft = TopLeft - vnormalize(TopLeft) *
BlockDepth*cosd(-45+Angle);
#local BottomRight = TopRight - vnormalize(TopRight) *
BlockDepth*cosd(-45+Angle+BlockAngle);
// Illustrate the algorithm with a randomly colored polygon
polygon {
4,
<BottomLeft.x,BottomLeft.z>, <BottomRight.x,BottomRight.z>,
<TopRight.x,TopRight.z>, <TopLeft.x,TopLeft.z>
pigment {color rgb
<rand(RandomSeed),rand(RandomSeed),rand(RandomSeed)>}
rotate 90*x
}
// Increment counters
#local BlockCounter = BlockCounter + 1;
#local Angle = Angle + BlockAngle;
#end
#end
// Define a section of 12 rows
#declare BlockSection = union {
#local I = 0;
#while (I<12)
union {RowOfBlocks() translate z*BlockDepth*I}
#local I = I + 1;
#end
}
// Show 3 sections side by side
object {BlockSection}
object {BlockSection translate CentreToCentre*x}
object {BlockSection translate -CentreToCentre*x}
Post a reply to this message
Attachments:
Download 'ngtest49 (paving).gif' (22 KB)
Preview of image 'ngtest49 (paving).gif'
![ngtest49 (paving).gif](/povray.binaries.images/attachment/%3C48c3c565%40news.povray.org%3E/ngtest49%20%28paving%29.gif?preview=1)
|
![](/i/fill.gif) |