POV-Ray : Newsgroups : povray.general : Fitting a gothic trefoil into an equilateral triangle Server Time
4 Aug 2024 12:20:06 EDT (-0400)
  Fitting a gothic trefoil into an equilateral triangle (Message 11 to 20 of 28)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>
From: LibraryMan
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 25 Jun 2003 12:25:01
Message: <web.3ef9cc73a1d38d6b738e706a0@news.povray.org>
INVALID_ADDRESS wrote:

>Now look at the midpoint 'Center2' of a circle touching the sides
>emanating from Corner2. Due to symmetry of this circle and the triangle
>with respect to the line through Corner2 and Center2, the angle between
>this line and the x-axis is 30 degrees (60/2). Now imagine a new point:
>the mirror image 'M' of Center1 with respect to the x-axis. The triangle
>   Corner2 -- Center1 -- M
>has 30+30 degrees at Corner1 (x-axis symmetry),

I was following just fine until this point (no pun intended).
On *my* diagram, Center1 corresponds to Corner1, Center2 to Corner2, etc.
I wondered if perhaps you meant to say that the point 'M' was the mirror
image of Center2, rather than Center1.  If I make point 'M' a mirror image
(with respect to the x-axis) of Center1, I end up with an isosceles
triangle whose longest side is the vertical line Center1 -- M .  This
leaves me with point 'M' having a y-value which is the negative of


The only way I can come up with the equilateral triangle you reference is by
substituting one vertex so that the vertices of the triangle are now
Corner2 -- Center2 -- M.
(Please forgive crude "drawing"):


| <-- y-axis
|        (.) Corner1
|
|        (.) Center1
|
|   (.)Center2
|
..Corner2______________  (x-axis)
|
|
|   (.) 'M'
|
|
|

Maybe I'm being dense in the head?....
Thanks,
mark


Post a reply to this message

From:
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 25 Jun 2003 17:47:56
Message: <3efa188c@news.povray.org>
Hi Mark,

obviously *I* am dense and you found my 3 errors. The section about
the centers should begin as follows:

[ centers ]
Now look at the midpoint 'Center2' of a circle touching the sides
emanating from Corner2. Due to symmetry of this circle and the triangle
with respect to the line through Corner2 and Center2, the angle between
this line and the x-axis is 30 degrees (60/2). Now imagine a new point:
the mirror image 'M' of Center2 with respect to the x-axis. The triangle
   Corner2 -- Center2 -- M
has 30+30 degrees at Corner2 (x-axis symmetry), its other two angles are
<continues as before>

Sorry for creating this confusion.


> If I make point 'M' a mirror image
> (with respect to the x-axis) of Center1, I end up with an isosceles
> triangle whose longest side is the vertical line Center1 -- M .  This
> leaves me with point 'M' having a y-value which is the negative of


If this "angle at Corner2" is meant to be
   angle ( Center1, Corner2, x-axis mirror image of Center1 )

   M1 = x-axis mirror image of Center1
Because Center1 is inside the triangle Corner1 -- Corner2 -- Corner3,
   angle ( Center1, Corner2, x-axis)
   < angle ( Corner1, Corner2, x-axis)

Now
   "angle at Corner2"
   = 2 * angle ( Center1, Corner2, x-axis) [x-axis symmetry]


case the "longest" side has the same length as the other sides!


Is the rest of my previous post understandable (with the above
corrections)?

   Sputnik


P.S.
Why "INVALID_ADDRESS" at the beginning of your last post?

--
----------------------------

fr### [at] computermuseumfh-kielde
----------------------------


Post a reply to this message

From: LinuxLibrarian
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 25 Jun 2003 20:43:23
Message: <3efa41ab@news.povray.org>

> Hi Mark,
> 
> obviously *I* am dense and you found my 3 errors. The section about
> the centers should begin as follows:
> 
> [ centers ]
> Now look at the midpoint 'Center2' of a circle touching the sides
> emanating from Corner2. Due to symmetry of this circle and the triangle
> with respect to the line through Corner2 and Center2, the angle between
> this line and the x-axis is 30 degrees (60/2). Now imagine a new point:
> the mirror image 'M' of Center2 with respect to the x-axis. The triangle
>    Corner2 -- Center2 -- M
> has 30+30 degrees at Corner2 (x-axis symmetry), its other two angles are
> <continues as before>
> 
> Sorry for creating this confusion.
> 
> 
> 
>>If I make point 'M' a mirror image
>>(with respect to the x-axis) of Center1, I end up with an isosceles
>>triangle whose longest side is the vertical line Center1 -- M .  This
>>leaves me with point 'M' having a y-value which is the negative of

> 
> 
> If this "angle at Corner2" is meant to be
>    angle ( Center1, Corner2, x-axis mirror image of Center1 )

>    M1 = x-axis mirror image of Center1
> Because Center1 is inside the triangle Corner1 -- Corner2 -- Corner3,
>    angle ( Center1, Corner2, x-axis)
>    < angle ( Corner1, Corner2, x-axis)

> Now
>    "angle at Corner2"
>    = 2 * angle ( Center1, Corner2, x-axis) [x-axis symmetry]


> case the "longest" side has the same length as the other sides!
> 
> 
> Is the rest of my previous post understandable (with the above
> corrections)?
> 
>    Sputnik
> 
> 
> P.S.
> Why "INVALID_ADDRESS" at the beginning of your last post?
> 
I don't know, it's how *your* address appears in the postings on the 
web-based interface to news.povray.org (see for yourself at 
http://news.povray.org  -- maybe you never read the newsgroups that way, 
so you didn't realize your address was being (or rather, not) displayed 
that way.

BTW, I also wondered about how you solved for the height.  I quote:

"The y-coordinate is the Height of the triangle, found by the law of
pythagoras in the right-angled triangle
    top point -- bottom left point -- midpoint of base line
so we get
    Height^2 + (Side/2)^2 = Side^2
Solving for Height gives
    Height = sqrt( Side^2 + Side^2/4 ) = sqrt(3)/2*Side"

Shouldn't the last line read:
Height = sqrt( Side^2 - (Side/2)^2)  ?
Or is that really the same thing?  I'm a little fuzzy on my exponents 
where fractions & diving are concerned.

But for the rest of it, I'm going off line now to study your
"revised edition." ;-)  THanks for all your indulgence!  Sorry to be
such a persnickety pain-in-the-ass!

--Mark


Post a reply to this message

From:
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 26 Jun 2003 18:37:21
Message: <3efb75a1$1@news.povray.org>
Hi Mark,

(Side/2)^2 = Side^2/4

The rule applied here is
   (A/B) ^ C = (A^C) / (B^C)

You can see this by replacing exponentiation by repeated multiplication,
for example with C=5: (use an non-proportional font to read this)

   (A/B)^5

     A   A   A   A   A
   = - * - * - * - * -
     B   B   B   B   B

     A*A*A*A*A
   = ---------
     B*B*B*B*B

     A^5
   = ---
     B^5

   = (A^5) / (B^5)

   = A^5/B^5

The last equation is true because "^" has higher priority than "/" (and
"*"). (This is a convention to save some parantheses, not a mathematical
necessity!)

In the trefoil Height formula,
   (Side/2)^2 = Side^2 / 2^2 = Side^2 / 4

so the Height is calculated as follows:
      [law of pythagoras]
   Height^2 + (Side/2)^2 = Side^2
      [subtract (Side/2)^2 on both sides of equation]
   Height^2 = Side^2 - (Side/2)^2
      [power (here: sqare) of quotient as above]
   Height^2 = Side^2 - Side^2 / 4
      ["*1 doesn't change anything; "/ 4" = "* 1/4"]
   Height^2 = Side^2 * 1 - Side^2 * 1/4
      [Side^2 is common factor]
   Height^2 = Side^2 * (1-1/4) = Side^2 * 3/4
      [square root on both sides of equation; sqrt(A*B) = sqrt(A)*sqrt(B)]
   sqrt(Height^2) = sqrt( Side^2 * 3/4 ) = sqrt(Side^2) * sqrt(3) / sqrt(4)
      [sqrt(A^2) = A (when A>=0)]
   Height = Side * sqrt(3)/2


Probably you have noticed that at some places in my explanation post I have
removed square roots from the denominator, because generally root-less
denominators are (aesthetically) preferred. The following examples show
how this can be done. Of course this is not required for POV-Ray's
calculations, I've done it only for humans :)
A, B, ... are arbitrary expressions; if the denominator contains more than
one root, these methods will have to be repeatedly applied.

[case 1: nothing added to the root]

      A            A     * sqrt(C)   A * sqrt(C)    A
   --------- = ------------------- = ----------- = --- * sqrt(C)
   B*sqrt(C)   B*sqrt(C) * sqrt(C)       B*C       B*C

[case 2: denominator is a sum]

         A               A       * (B*sqrt(C)-D)
   ------------- = -----------------------------
   B*sqrt(C) + D   (B*sqrt(C)+D) * (B*sqrt(C)-D)

      [in denominator: (X+Y)*(X-Y) = X*X-X*Y+Y*X-Y*Y = X^2 - Y^2]

      A*B*sqrt(C) - A*D    A*B*sqrt(C) - A*D
   = ------------------- = -----------------
     (B*sqrt(C))^2 - D^2      B^2*C - D^2


How far can you proceed now in understanding the trefoil calculations?


   Sputnik


Post a reply to this message

From: LibraryMan
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 27 Jun 2003 12:35:01
Message: <web.3efc711fa1d38d6b738e706a0@news.povray.org>
INVALID_ADDRESS wrote:

> Of course this is not required for POV-Ray's
>calculations, I've done it only for humans :)

Or in my case, chimpanzees...  But maybe that's being insulting to the
supposedly lower primates...
Thanks, I follow you now!
I bet you didn't realize you'd end up as an online math tutor...
Again, your patience is verging on the superhuman!
Many thanks again!
--Mark


Post a reply to this message

From: Mark M  Wilson
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 29 Jun 2003 22:35:47
Message: <3effa203@news.povray.org>
I made a couple of modifications to your original, now that I have some
understanding of what was going on.   Basically, I moved the definition
of 'R' to after Radius, and made R=0.10*Radius
I also removed the part in the middle where the tori overlap.


// macro for trefoil ====================================================

#macro Trefoil (Side, Radius) // lower left corner at origin

    #local Height  = sqrt(3)/2*Side;

    #local Corner1 = <Side/2, Height, 0>; // top corner
    #local Corner2 = 0; // bottom left corner
    #local Corner3 = Side*x; // bottom right corner

    #local Center  = <Side/2,
   Height/3, 0>; // triangle

    #local Center1 = <Side/2, Height-2*Radius, 0>; // top circle
    #local Center2 = <sqrt(3)*Radius, Radius, 0>; // bottom left circle
    #local Center3 = <Side-sqrt(3)*Radius, Radius, 0>; // bottom right 
circle
    #local R = Radius*0.1; //
    union {
      /*union {
        sphere { Corner1, R }
        sphere { Corner2, R }
        sphere { Corner3, R }
        cylinder { Corner1, Corner2, R }
        cylinder { Corner2, Corner3, R }
        cylinder { Corner3, Corner1, R }
        texture { pigment { color green
   1 } finish { ambient 1 } }
        }*/

      difference {
      union {
        torus { Radius, R rotate 90*x translate Center1
        clipped_by {
        plane { <0, -1, 0> 0 rotate -z*30 translate <(Side/2),
Center1.y-(Radius), 0> }
        }
        clipped_by {
        plane { <0, -1, 0> 0 rotate z*30 translate <(Side/2),
Center1.y-(Radius), 0> }
        }
        }

        torus { Radius, R rotate 90*x translate Center2
        clipped_by {
        plane { <0, 1, 0>, 0 rotate -z*30 translate <(Side/2),
(Center1.y-(Radius)), 0>
        }}
        clipped_by {
        plane { <1, 0, 0>, 0 translate <Side/2, (Center1.y-(Radius)), 0> }
        }}


        torus { Radius, R rotate 90*x translate Center3
        clipped_by {
        plane { <-1, 0, 0>, 0 translate <Side/2, (Center1.y-Radius), 0> }
        }
        clipped_by {
        plane { <0, 1, 0> 0 rotate z*30 translate <(Side/2),
(Center1.y-Radius), 0>}
        }
        }
        texture { pigment { color red 1 } finish { ambient 1 } }
        }
        sphere { <Side/2, (Center1.y-Radius), 0> 2*R }
        }



      // "}" omitted to allow application of transformations

    #end//macro Trefoil


// simple scene with trefoils ===========================================

//Trefoil ( 1  , 1*(sqrt(3)-1)/4 ) translate <-1.6, 0.2  , 1> } // small
Trefoil ( 0.46  , 0.46*sqrt(3)/9     ) translate <-0.5  , 0    , 1> } //
gothic
//Trefoil ( 1  , 1*sqrt(3)/6     ) translate < 0.6,  0.2  , 1> } // large

light_source { <-1500, 2500, -1000>, color rgb 1 }

camera { //orthographic
up y right 1.3*x
location <-0.23, 0.2, -0.09>
look_at <-0.23, 0.2, 0>
}


// END ==================================================================


Post a reply to this message

From:
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 30 Jun 2003 15:54:50
Message: <3f00958a$1@news.povray.org>
Hi Mark,

my little scene was meant as an illustration of a geometric problem -- nice
to see it evolve into something really useable. I suggest to supply the
"linewidth" as an additional parameter instead of a constant fraction of
Radius. If you decide to change this value, it's much easier to have POV-
Ray doing all the calculations instead of "re-inventing the wheel again and
again by hand-calculation". And you can't animate the "linewidth" when
this relationship is fixed. The calculations have to be done anyway,
there is almost no difference between using "0.1*Radius" and "Linewidth",
so give this parameter to POV-Ray and let it do the boring numerical work.
Having a "linewidth factor" parameter also would be possible; the actual
value for this parameter would be 0.1 to reproduce what you've done, but
can easily be changed at will.

Because the thin circles have become rings with some linewidth now, there
arises a new problem: What is a "true gothic" constellation?
Of course the outer border/circle of the rings must touch the triangle.
But how large should these rings be?
   1. The outer circles intersect at the triangle's midpoint
      This is the easiest case: outer circle is as before; some linewidth
      is added towards the circle's centers.
   2. The inner circles intersect at the triangle's midpoint
      I don't think this is looking good with a large linewidth, so
      the calculation isn't worth it.
   3. The "mid-circles" with radius=(inner_radius+outer_radius)/2 intersect
      at the triangle's midpoint.
      I suppose this will look "most gothic", but will require some
      calculation ... (maybe I'll do this).

You should also try to remove the inner parts of the rings by difference-ing
with a cylinder around Center, having a radius = Radius.

Next tasks :)
   - replace the torii by cylindrical rings (difference of a cylinder and a
     thinner, but slightly longer [to avois coincident surfaces] cylinder,
     the Thickness being a new parameter). You have to do a little calculation
     involving Linewidth (or LinewidthFactor or whatever), but then changing
     this Linewidth is no pain: no new hand-calculation is neccessary, POV-Ray
     does it all. I suggest to write a macro Ring ( Radius, Linewidth ) that
     "behaves" similar to torus { Minor, Major ... }, this makes it easy to
     change all torus{} objects to Ring objects. The trick of omitting the
     closing "}" of the object created by Ring will help (look at the end
     of the Trefoil macro where I used this trick).
   - create your *own* stone texture
   - arrange some trefoils, light source(s) and a camera to create a pleasing
     scene; perhaps add some bricks, columns, decorative elements, windows,
     floor tiles, stone carvings, stairs, roof tiles, ...
   - at least *try* to find a solution for "true gothic" case 3.


Sputnik


Post a reply to this message

From: LibraryMan
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 2 Jul 2003 14:25:01
Message: <web.3f032243a1d38d6b738e706a0@news.povray.org>
INVALID_ADDRESS wrote:

>Of course the outer border/circle of the rings must touch the triangle.
>But how large should these rings be?
>   1. The outer circles intersect at the triangle's midpoint
>      This is the easiest case: outer circle is as before; some linewidth
>      is added towards the circle's centers.
>   2. The inner circles intersect at the triangle's midpoint
>      I don't think this is looking good with a large linewidth, so
>      the calculation isn't worth it.
>   3. The "mid-circles" with radius=(inner_radius+outer_radius)/2 intersect
>      at the triangle's midpoint.
>      I suppose this will look "most gothic", but will require some
>      calculation ... (maybe I'll do this).

Yes, realistically the stone trifoil tracery would not be merely tangent to
a circle which frames it, but would look like it was being "blobbed" into
it. (Else, how could it the tracery be physically held in place?)
For instance, the hexafoils framing the stained glass in the upper part of
this image from Bourges Cathedral:
http://www.bc.edu/bc_org/avp/cas/fnart/arch/gothic/bourges/bourges_int09.jpg


>
>You should also try to remove the inner parts of the rings by difference-ing
>with a cylinder around Center, having a radius = Radius.

I didn't know if it really mattered exactly what sort of primitive was being
used to difference out the parts of the rings.  Would there be a benefit in
terms of tracing/parsing time?

>Next tasks :)
>   - replace the torii by cylindrical rings (difference of a cylinder and a
>     thinner, but slightly longer [to avois coincident surfaces] cylinder,
>     the Thickness being a new parameter). You have to do a little calculation
>     involving Linewidth (or LinewidthFactor or whatever), but then changing
>     this Linewidth is no pain: no new hand-calculation is neccessary, POV-Ray
>     does it all. I suggest to write a macro Ring ( Radius, Linewidth ) that
>     "behaves" similar to torus { Minor, Major ... }, this makes it easy to
>     change all torus{} objects to Ring objects. The trick of omitting the
>     closing "}" of the object created by Ring will help (look at the end
>     of the Trefoil macro where I used this trick).

I thought of this, but the edges looked a little too squared off for what I
remember being authentic (and I've been poring over A LOT of books &
websites about cathedrals & Gothic style).


>   - create your *own* stone texture

jaw drops, mouth goes dry, limbs gradually go numb... ;-)

>   - arrange some trefoils, light source(s) and a camera to create a pleasing
>     scene; perhaps add some bricks, columns, decorative elements, windows,
>     floor tiles, stone carvings, stairs, roof tiles, ...
>   - at least *try* to find a solution for "true gothic" case 3.
>
  The 2nd of these last two tasks seems to be the easier!
I have thus far a floor, columns & footings, empty windows waiting for
inspired "glass" (maybe just borrowed images converted to a format that
will allow me to play with the transparency/translucency).  I also have the
nave ceiling ribbing and vaulting, piers at the 'crossing', a west wall &
portal.  All of these are still quite primitive looking, but they're the
most my skills (and limited time to work ) allow.
I went thorough a lot of trouble to get the vault ribbing to look like it
was composed of individual component pieces (again, as in the image cited
above).
I'd post it on the images group as a WIP, but I'm still too embarrassed at
how little progress I've made, when I think of how long I've actually been
at it.

But then again, I really didn't spend a lot of time on spheres & checkered
planes before I dove in over my head.  Boring!

Thanks again for all your input!
--Mark


Post a reply to this message

From: LibraryMan
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 2 Jul 2003 15:05:01
Message: <web.3f032ba9a1d38d6b738e706a0@news.povray.org>
INVALID_ADDRESS wrote:
>
>Next tasks :)
The trick of omitting the closing "}" of the object created by Ring will
help (look at the end of the Trefoil macro where I used this trick).
>

Yes, that closing "}" really confused me.  I didn't really understand why it
was necessary, especially when I couldn't find the opening "{".
(Did it have anything to do with your commented-out statement about the
closing "}" being omitted for to allow for translations? )
I'd never before noticed any other examples of macro calling with {}'s.
()'s, yes!

I suppose I'd better go study macros some more.  (But then, that's part of
my problem about slow progress:  Every scene component I attempt to add
involves an episode of "that doesn't do AT ALL what I wanted/expected," and
I have to reverse myself and do so much doc-reading (which introduces me to
yet more confusing concepts, spawning yet more tangents..)

--Mark


Post a reply to this message

From:
Subject: Re: Fitting a gothic trefoil into an equilateral triangle
Date: 2 Jul 2003 21:54:10
Message: <3f038cc2$1@news.povray.org>
Hi Mark,

I suggested to clip with a "center cylinder" to get rid of the sharp "inner
spikes", just for aesthetical reasons.


> >   - create your *own* stone texture
>
> jaw drops, mouth goes dry, limbs gradually go numb... ;-)

Why this?
Experiment with some stone textures from stones1.inc and stones2.inc, modify
the colors in the color_map (and convert the color_maps to the new syntax!)
use other wave_types, play around with different patterns, scaling (even and
uneven) and rotation, modify the modifiers. Then finish, normal, layered
textures, ...
A perfect stone texture is difficult, but an acceptable stone texture isn't.


> I went thorough a lot of trouble to get the vault ribbing to look like it
> was composed of individual component pieces

Why "look like"? You could use truly individual components! (Don't forget
the mortar between them!)


Now I reveal: The trick of the missing "}"
Assume you want a macro for a simple ring:

    #macro Ring(Size)
      difference {
        cylinder { -0.05*y, 0.05*y, 0.5 }
        cylinder { -0.051*y, 0.051*y, 0.4 }
        scale Size
        }
      #end//of macro Ring

Now you can use this macro to create a ring at the origin with the default
texture:

    Ring(3)

This is equivalent to the body of the macro with parameter names replaced
by the supplied value, i.e. this represents a complete difference statement.
But if you want to apply a texture, translate it or such, you have to write

    object { Ring(3) texture { MyRingTex } translate <1, 2, 3> }

I prefer to leave out the line with the single "}" in the macro. (It is
legal to have unmatched parentheses in a macro.) Now Ring(3) delivers

    difference {
        cylinder { -0.1*y, 0.1*y, 0.5 }
        cylinder { -0.11*y, 0.11*y, 0.4 }
        scale 3

and you can append whatever is possible with a difference. At the end the
matching "}" for the "difference {" must be supplied. So for example

    Ring(3) texture { MyRingTex } translate <1, 2, 3> }

is the same as

    difference {
        cylinder { -0.1*y, 0.1*y, 0.5 }
        cylinder { -0.11*y, 0.11*y, 0.4 }
        scale 3
        texture { MyRingTex } translate <1, 2, 3> }

In short: the "}" is not supplied in the macro, but in the SDL after the
invocation of the macro.

Don't worry about slow progress: this only means your work is improving
your POV-Ray expertise instead of your scene -- you should be happy
about this!

   Sputnik


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>

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