POV-Ray : Newsgroups : povray.newusers : CSG Problems in drawing Arc : Re: CSG Problems in drawing Arc Server Time
2 Jun 2024 14:35:05 EDT (-0400)
  Re: CSG Problems in drawing Arc  
From: Eugene K
Date: 11 Oct 2012 02:30:07
Message: <web.5076669c1ba8ef451d9406540@news.povray.org>
So here I am answering my own post, with a much improved
torus-cone version to attempt drawing an arc:
//=========================================
// ARC AROUND THE 'Z' AXIS
// ----------------------------------------
     #macro  arc_tor_z(rArc,oArc,oClk,rWir)
// --------  ------------------------------
     #local  oRad = rad(oArc/2) ;
     #local  hY = (rArc*cos(oRad)+rWir) ;
     #local  rX = (rArc*sin(oRad)+rWir) ;
     debXY_f(rX,hY,"cone(rX,hY)")
// --------
   intersection                    {
     torus_z(rArc,rWir)
       cone{ p0, r0, hY*y, rX }
     rotate  +oClk*RolClk          }   #end
//=========================================
// ARC AROUND THE 'Y' AXIS
// ----------------------------------------
     #macro  arc_tor_y(rArc,oArc,oRgt,rWir)
// --------  ------------------------------
     #local  oRad = rad(oArc/2) ;
     #local  hZ = (rArc*cos(oRad)+rWir) ;
     #local  rX = (rArc*sin(oRad)+rWir) ;
     debXY_f(rX,hZ,"cone(rX,hZ)")
// --------
   intersection                    {
     torus_y(rArc,rWir)
       cone{ p0, r0, hZ*z, rX }
     rotate  +oRgt*YawRgt          }  #end
//=========================================

//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   #include "arc_tor.txt"
//                     rArc  oArc  oClk  rWir
    object{  arc_tor_z(+3.0, +000, +000, rWire)
             texture{UtilWht}  }
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Here is '#DEBUG.txt' file data produced by the 'debXY( )' above
from my 'macDeb' package, showing reasonable numbers for the cone:
#debug: ###################### DEBUG MESSAGES OPENING #######################
#debug:
#debug:      2.131 :X         2.131 :Y     = cone(rX,hY)
#debug:
#debug: ###################### DEBUG MESSAGES CLOSING #######################

BUT --  CSG still does not work; we get two lit pixels at the intersection
of torus and cone boundary, indicating two points of intersection,
but that's it!


Oh! Yes!  Version 3.6.2.msvc9 file was 'povwin362-32bit.msi', installed WinXP.

Eugene.K


Post a reply to this message

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