POV-Ray : Newsgroups : povray.binaries.images : Four-Centered Arch : Re: Four-Centered Arch Server Time
20 May 2024 04:20:34 EDT (-0400)
  Re: Four-Centered Arch  
From: Samuel B 
Date: 23 Jul 2023 21:35:00
Message: <web.64bdd46ab7f509a4f8c47d526e741498@news.povray.org>
"Samuel B." <stb### [at] hotmailcom> wrote:
> A four-centered arch.

Here's a helper macro to make arches with inset surfaces. You can specify both
inset amount and inset depth.

#macro FourCenteredArch_Inset(AW1, AH1, CR1,  AW2, AH2, CR2,  AD, BV, IN, ID)
 #local Eps = .0001;
 union{
  FourCenteredArch(AW1, AH1, CR1,  AW2, AH2, CR2,  AD-ID, BV)
  object{
   #local DP =  max(BV+Eps, ID);
   FourCenteredArch(AW1-IN, AH1-IN, CR1-IN,  AW2+IN, AH2+IN, CR2+IN, DP, BV)
   translate - z*(AD-DP)
  }
 }
#end

And its usage:

object{
    FourCenteredArch_Inset(
     1.0, // arch width 1 (from center)
     2.0, // arch height 1 (from ground)
     0.3, // radius 1 (outer corner, >=0 & <=arch width 1)

     0.6, // arch width 2 (from center)
     1.35, // arch height 2 (from ground)
     0.1, // radius 2 (inner corner, >=0 & <=arch width 2)

     0.3, // arch depth (to -z)
     0.013, // edge bevel radius (>arch depth)

     0.05 // inset amount
     0.025 // inset depth
    )
   }


Post a reply to this message


Attachments:
Download '4-centeredarchc-inset.jpg' (23 KB)

Preview of image '4-centeredarchc-inset.jpg'
4-centeredarchc-inset.jpg


 

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