POV-Ray : Newsgroups : povray.binaries.images : Gothic cathedral window generator Server Time
19 May 2024 22:58:10 EDT (-0400)
  Gothic cathedral window generator (Message 11 to 20 of 24)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 4 Messages >>>
From: Bald Eagle
Subject: Re: Gothic cathedral window generator
Date: 18 Jul 2023 19:00:00
Message: <web.64b718e637209b7f1f9dae3025979125@news.povray.org>
"Samuel B." <stb### [at] hotmailcom> wrote:

> Btw, what were you using this kind of geometry for?

Originally, I was using it to find the radius of the sphere I needed to subtract
from a (rounded) box to make a laptop keyboard key.

It's also useful for making any concave "cap" to a cylinder or a box.

https://news.povray.org/povray.general/message/%3Cweb.643317271ef881ca1f9dae3025979125%40news.povray.org%3E/#%3Cweb.643
317271ef881ca1f9dae3025979125%40news.povray.org%3E

I also needed this, or a variation thereof, to find the center of a very large
circle in order to model a sheet metal / screen development for making a
replacement globe for a vintage dual-fuel lantern I have.

Modeling software is great, since you can get the curve you need using the
actual center, since the entire workspce is virtual, but when laying out such an
arc IRL, one needs alternative approaches when either the center is inaccessible
or the radius makes scribing the arc wildly impractical.   There are several
such ingenious approaches.

- BW


Post a reply to this message

From: Samuel B 
Subject: Re: Gothic cathedral window generator
Date: 18 Jul 2023 19:35:00
Message: <web.64b7213337209b7ff8c47d526e741498@news.povray.org>
"Samuel B." <stb### [at] hotmailcom> wrote:
> Macro incoming...

Second version of the macro.

Changes:

    * glass now renders correctly
    * can specify the position of the bottom horizontal frame member
    * various clarification of comments

The macro:

#macro Gothic_Window
 (
  WW, // window box width (total window width divided by two)
  WH, // window box height
  WD, // window box depth
  AH, // arch height (beginning from top [-y], should be >=window width and
<window height)
  HY, // y-position for horizontal cross member (beginning from y, will only be
used if there is room for it)
  FR, // frame radius (thickness of the frame)
  ET, // enclosure thickness (window box, should be qual or less than frame
radius)
  NA, // number of arch pieces
  PT, // number of arch pieces
  BW // window pane bevel width
 )

 #local Eps = .0001; // a small value

 union{

  // -< window width, arch height, 0 >
  #local P = -<WW, AH, 0>;

  // arch circle center
  #local CC = <.5*(P.x-P.y/(WW/AH)), -AH, 0>;

  // arch circle radius
  #local CR = vlength(CC);

  // window box
  box{<-WW, -WH+ET, -Eps>, <-WW+ET, -AH, WD+Eps>}
  box{<WW-ET, -WH+ET, -Eps>, <WW, -AH, WD+Eps>}
  box{<-WW, -WH, -Eps>, <WW, -WH+ET, WD+Eps>}
  difference{
   box{<-WW, -AH, 0>, <WW, 0, WD>}
   intersection{
    cylinder{<CC.x, CC.y, -Eps>, <CC.x, CC.y, WD+Eps>, CR-ET}
    cylinder{<-CC.x, CC.y, -Eps>, <-CC.x, CC.y, WD+Eps>, CR-ET}
   }
  }

  #local FR2 = .4 * FR;

  // horizontal frame at bottom of curved arch
  cylinder{-<WW, AH, 0>, <WW, -AH, 0>, FR}
  cylinder{-<WW, AH, FR>, <WW, -AH, -FR>, FR2}

  cylinder{-<WW, WH, 0>, <WW, -WH, 0>, FR}
  cylinder{-<WW, WH, FR>, <WW, -WH, -FR>, FR2}

  // bottom horizontal frame piece
  #if(HY<WH-AH)
   cylinder{<-WW, -WH+HY, 0>, <WW, -WH+HY, 0>, FR}
   cylinder{<-WW, -WH+HY, -FR>, <WW, -WH+HY, -FR>, FR2}
  #end

  // multiarch setup
  #for(I, 0, NA)

   #if(I<NA)

    #local ArchPiece =
     intersection{
      merge{
       torus{
        CR, FR
        rotate x*90
        translate CC+2*x*WW*I/NA
       }
       torus{
        CR, FR2
        rotate x*90
        translate CC-z*FR+2*x*WW*I/NA
       }
      }

      plane{y, -AH inverse}

      // use vertical cut for first item, otherwise use a cylinder
      #if(I=0)
       plane{x, 0}
      #else
       cylinder{<-CC.x, CC.y, -2*FR>, <-CC.x, CC.y, 2*FR>, CR}
      #end
     }

    object{ArchPiece}
    object{ArchPiece scale <-1, 1, 1>}

   #end

   cylinder{-<WW, WH, 0>, -<WW, AH, 0>, FR translate x*2*WW*I/NA}
   cylinder{-<WW, WH, FR>, -<WW, AH, FR>, FR2 translate x*2*WW*I/NA}

  #end

  // fill the corners
  sphere{-<WW, WH, 0>, FR}
  sphere{<WW, -WH, 0>, FR}
  sphere{-<WW, WH, FR>, FR2}
  sphere{<WW, -WH, -FR>, FR2}

  #local TexWindow =
   texture{
    pigment{rgb .75 transmit .85}
    finish{reflection{0, 1 fresnel} conserve_energy}
   }

  // glass window pane
  #if(true)
   union{
    box{
     <-WW+Eps, -WH+Eps, PT>, <WW-Eps, -Eps, PT>
     texture{TexWindow}
     inverse
    }
    box{
     <-WW+Eps, -WH+Eps, Eps>, <WW-Eps, -Eps, Eps>

     texture{
      TexWindow
      normal{
       #local CX = CC.x;
       #local CY = CC.y;
       #local FA =
        function{
         min(
          1
          #for(I, 0, NA-1)
           ,abs(sqrt(pow(x-CX-2*WW*I/NA, 2)+pow(y-CY, 2)*(y>-AH))-CR)
          #end
         )
        }
       function{
        min(
         1,
         min(
          FA(x, y, 0),
          FA(-x, y, 0),
          abs(y+AH),
          abs(y+WH)
          #if(HY<WH-AH)
           ,abs(y+WH-HY)
          #end
         ) / BW
        )
       }
       bump_size 1
       accuracy .003
      }
     }
    }
    interior{ior 1.5}
    double_illuminate
   }
  #end

  // place object at y=0
  translate y*WH
 }
#end

Macro invocation:

object{
  Gothic_Window(
   1.0,  // window box width (total window width divided by two)
   4.0,  // window box height
   0.75,  // window box depth
   1.875, // arch height (beginning from top [-y], should be >=window width and
<window height)
   0.375, // y-position for horizontal cross member (beginning from y, will only
be used if there is room for it)
   0.05,  // frame radius (thickness of the frame)
   0.01,  // enclosure thickness (window box, should be qual or less than frame
radius)
   3,   // number of arch pieces
   0.01,  // window pane thickness
   0.125  // window pane bevel width
  )
  // window box material goes here
  pigment{rgb .75}
 }

Sam


Post a reply to this message


Attachments:
Download 'gothicarchb0m_59s.jpg' (73 KB)

Preview of image 'gothicarchb0m_59s.jpg'
gothicarchb0m_59s.jpg


 

From: Samuel B 
Subject: Re: Gothic cathedral window generator
Date: 18 Jul 2023 20:35:00
Message: <web.64b72f8437209b7ff8c47d526e741498@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Samuel B." <stb### [at] hotmailcom> wrote:
>
> > Btw, what were you using this kind of geometry for?
>
> Originally, I was using it to find the radius of the sphere I needed to subtract
> from a (rounded) box to make a laptop keyboard key.
>
> It's also useful for making any concave "cap" to a cylinder or a box.
>
>
https://news.povray.org/povray.general/message/%3Cweb.643317271ef881ca1f9dae3025979125%40news.povray.org%3E/#%3Cweb.6
43
> 317271ef881ca1f9dae3025979125%40news.povray.org%3E
>
> I also needed this, or a variation thereof, to find the center of a very large
> circle in order to model a sheet metal / screen development for making a
> replacement globe for a vintage dual-fuel lantern I have.
>
> Modeling software is great, since you can get the curve you need using the
> actual center, since the entire workspce is virtual, but when laying out such an
> arc IRL, one needs alternative approaches when either the center is inaccessible
> or the radius makes scribing the arc wildly impractical.   There are several
> such ingenious approaches.
>
> - BW

It looks like a good solution, but I must admit I can't quite comprehend a lot
of it. (I will keep trying, though.)

Speaking of solutions, I've been making an effort to not use the trace()
function so much since it just adds more complications when porting to another
context. And I just like knowing how something is done instead of relying on a
'black box' function. (Not that trace() is very black-box in theory, but
figuring out every intersection for every traceable object is not a small task.)

Did you ever post the dual-lantern model? I can't remember if it was you, or
someone else on another forum using Blender. /Somebody/ posted a lantern, that's
all I know!

I keep getting stuck figuring out things like intricate geometry, rendering
efficiency, or some other complicated implementation of things. And then I burn
out any energy I had producing the thing I was after initially! :S Drawing
things is much easier than rendering them. The devil is in the details...
distracting me, I guess.

Sam


Post a reply to this message

From: Bald Eagle
Subject: Re: Gothic cathedral window generator
Date: 19 Jul 2023 06:35:00
Message: <web.64b7bbfc37209b7f1f9dae3025979125@news.povray.org>
"Samuel B." <stb### [at] hotmailcom> wrote:

> It looks like a good solution, but I must admit I can't quite comprehend a lot
> of it. (I will keep trying, though.)

Apparently it is "the" solution, as I basically came across this exact equation
once when I was trying to save myself the trouble of re-deriving it.   :D

You have the "height" h of the arc, or depth that the circle/sphere pokes into
the object when it butts up against the edges.   Picture resting an oversize
ball in the mouth of a glass.

You also have the radius of the desired circle. r

We draw a chord perpendicular to the radius at height h, and use one half of
that as the leg of a triangle.  (L/2)  Drawing a line from the edge/circle
intersection to the circle center, we get the hypotenuse, which is just another
radius of the circle.

The other leg of the triangle is the radius minus the height of the arc.

Now you just do the Pythagorean theorem, and expand terms, simplify, and
rearrange to get r.

The diagram is messier because I used (L/2) instead of defining l = L/2, which
just makes the equation look a lot nicer.

Hope that helps.


Post a reply to this message

From: Bald Eagle
Subject: Re: Gothic cathedral window generator
Date: 19 Jul 2023 06:55:00
Message: <web.64b7bff837209b7f1f9dae3025979125@news.povray.org>
"Samuel B." <stb### [at] hotmailcom> wrote:

> Did you ever post the dual-lantern model? I can't remember if it was you, or
> someone else on another forum using Blender. /Somebody/ posted a lantern, that's
> all I know!


I did not - as it wasn't really a project for a render, but a desire to
construct an inexpensive and functional replacement for an expensive vintage
glass globe.

It's a Thermos 8326, which has a bit of a taper / cone shape.

I think I saw that maybe a new manufacture Coleman A200 would fit, but I have to
find one and measure it.

It's really just there to protect the fragile mantles from accidental damage or
insects flying in, while still letting the light out.

- BW


Post a reply to this message


Attachments:
Download 'thermos8326.png' (76 KB)

Preview of image 'thermos8326.png'
thermos8326.png


 

From: Samuel B 
Subject: Re: Gothic cathedral window generator
Date: 19 Jul 2023 17:55:00
Message: <web.64b85b2137209b7ff8c47d526e741498@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Op 18-7-2023 om 02:27 schreef Samuel B.:
> > [...] It's a generic gothic/medieval window macro. [...]
>
> Aaah! I love this! Can it do the typically English 4-centered arch? I
> have been trying to write a macro lately but did not get very far.
>
> --
> Thomas

Well, you got me interested in the 4-centered arch. I found the following video
that explains how to make the underlying shape using a compass and straightedge:
https://www.youtube.com/watch?v=sgyYXKgs8gw

Basically, you start with the smallest circle's position and radius, and
eventually find the center of the 'X'. Then you use that to make a second
circle. As it turns out, the curved portion is made from just two perfect circle
segments.

I hope to get a proper object macro going soon. Not sure what the final geometry
will be, since there are smooth arches, chamfered and/or filleted arches,
bricked arches, stepped arches... and any combination of those and beyond...

Sam


Post a reply to this message


Attachments:
Download '4centeredarchgeometry.jpg' (45 KB)

Preview of image '4centeredarchgeometry.jpg'
4centeredarchgeometry.jpg


 

From: Mike Miller
Subject: Re: Gothic cathedral window generator
Date: 19 Jul 2023 18:15:00
Message: <web.64b85f3537209b7fb5177e91dabc9342@news.povray.org>
"Samuel B." <stb### [at] hotmailcom> wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
> > Op 18-7-2023 om 02:27 schreef Samuel B.:
> > > [...] It's a generic gothic/medieval window macro. [...]
> >
> > Aaah! I love this! Can it do the typically English 4-centered arch? I
> > have been trying to write a macro lately but did not get very far.
> >
> > --
> > Thomas
>
> Well, you got me interested in the 4-centered arch. I found the following video
> that explains how to make the underlying shape using a compass and straightedge:
> https://www.youtube.com/watch?v=sgyYXKgs8gw
>
> Basically, you start with the smallest circle's position and radius, and
> eventually find the center of the 'X'. Then you use that to make a second
> circle. As it turns out, the curved portion is made from just two perfect circle
> segments.
>
> I hope to get a proper object macro going soon. Not sure what the final geometry
> will be, since there are smooth arches, chamfered and/or filleted arches,
> bricked arches, stepped arches... and any combination of those and beyond...
>
> Sam

Cool stuff Sam.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Gothic cathedral window generator
Date: 20 Jul 2023 02:37:54
Message: <64b8d642$1@news.povray.org>
Op 19/07/2023 om 23:52 schreef Samuel B.:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> Op 18-7-2023 om 02:27 schreef Samuel B.:
>>> [...] It's a generic gothic/medieval window macro. [...]
>>
>> Aaah! I love this! Can it do the typically English 4-centered arch? I
>> have been trying to write a macro lately but did not get very far.
>>
>> --
>> Thomas
> 
> Well, you got me interested in the 4-centered arch. I found the following video
> that explains how to make the underlying shape using a compass and straightedge:
> https://www.youtube.com/watch?v=sgyYXKgs8gw
> 
Yes, that is the procedure indeed.

> Basically, you start with the smallest circle's position and radius, and
> eventually find the center of the 'X'. Then you use that to make a second
> circle. As it turns out, the curved portion is made from just two perfect circle
> segments.
> 
> I hope to get a proper object macro going soon. Not sure what the final geometry
> will be, since there are smooth arches, chamfered and/or filleted arches,
> bricked arches, stepped arches... and any combination of those and beyond...
> 
> Sam
> 
Very good. Looking forward to it. thanks!

-- 
Thomas


Post a reply to this message

From: Samuel B 
Subject: Re: Gothic cathedral window generator
Date: 20 Jul 2023 19:00:00
Message: <web.64b9bb9637209b7ff8c47d526e741498@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Op 19/07/2023 om 23:52 schreef Samuel B.:
> > Thomas de Groot <tho### [at] degrootorg> wrote:
> >> Op 18-7-2023 om 02:27 schreef Samuel B.:
> >>> [...] It's a generic gothic/medieval window macro. [...]
> >>
> >> Aaah! I love this! Can it do the typically English 4-centered arch? I
> >> have been trying to write a macro lately but did not get very far.

> > I hope to get a proper object macro going soon. Not sure what the final geometry
> > will be, since there are smooth arches, chamfered and/or filleted arches,
> > bricked arches, stepped arches... and any combination of those and beyond...
> >
> [...] Very good. Looking forward to it. thanks!

Thank you. I got some work done on it today. Had to make it fit within a box and
margins. But, what kind of geometry to use? Many of the examples I've seen show
arches made from bricks. So, I guess that's what I will shoot for...

Sam


Post a reply to this message

From: Thomas de Groot
Subject: Re: Gothic cathedral window generator
Date: 21 Jul 2023 02:42:38
Message: <64ba28de$1@news.povray.org>
Op 21/07/2023 om 00:56 schreef Samuel B.:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> Op 19/07/2023 om 23:52 schreef Samuel B.:
>>> Thomas de Groot <tho### [at] degrootorg> wrote:
>>>> Op 18-7-2023 om 02:27 schreef Samuel B.:
>>>>> [...] It's a generic gothic/medieval window macro. [...]
>>>>
>>>> Aaah! I love this! Can it do the typically English 4-centered arch? I
>>>> have been trying to write a macro lately but did not get very far.
> 
>>> I hope to get a proper object macro going soon. Not sure what the final geometry
>>> will be, since there are smooth arches, chamfered and/or filleted arches,
>>> bricked arches, stepped arches... and any combination of those and beyond...
>>>
>> [...] Very good. Looking forward to it. thanks!
> 
> Thank you. I got some work done on it today. Had to make it fit within a box and
> margins. But, what kind of geometry to use? Many of the examples I've seen show
> arches made from bricks. So, I guess that's what I will shoot for...
> 
> Sam
> 
I suppose that - like gothic windows or gates - they could be made also 
from stone and sculpted. See for example:
https://www.canterbury-archaeology.org.uk/four-centred-arch

Wood seems also to be widely used for indoor purposes.

But I see what you mean. The material can be an important (structural) 
element.

-- 
Thomas


Post a reply to this message

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

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