POV-Ray : Newsgroups : povray.text.scene-files : Re: Announce: IsoCSG include file 0.2.1 Server Time
29 Jul 2024 08:24:22 EDT (-0400)
  Re: Announce: IsoCSG include file 0.2.1 (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From:
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 25 Mar 2002 05:42:01
Message: <7fvt9u0qv5357ile4c5a638ku65dd69c2g@4ax.com>

> Here is proposition of ...

IC_Cylinder_Hole which in fact is shape of intersection of two cylinders
along one axis. Note that this macro has proper inside/outside behaviour and
is compatible with "sharp/rounded" strategy becouse internally use IC_Box.

#macro IC_Cylinder_Hole (Start, End, Radius, Hole)
  #local Cx=Start.x;
  #local Cy=Start.y;
  #local Cz=Start.z;

  #local Len=vlength(End-Start);

  #if (Len=0)
    #error "iso_csg.inc: Error: zero height cylinder"
  #end

  #local fn_T = function { Reorient_Trans( End-Start , x) }

  #local fn_X = IC_Box( <0,Hole,-2*max(Len,Radius,Hole)> ,
<Len,Radius,2*max(Len,Radius,Hole)> );

  #local fn_Y = function(x, y, z){
    fn_X( fn_T(x, y, z).x , f_r( 0 , fn_T(x, y, z).y , fn_T(x, y, z).z ) , 0 )
  }
  
  function(x, y, z){
    fn_Y( x - Cx , y - Cy , z - Cz )
  }
  
#end

ABX


Post a reply to this message

From:
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 2 May 2002 03:21:42
Message: <4mp1du4obelntvstdua4foq43q6n1tjgeu@4ax.com>

wrote:
> Here is proposition ...

... IC_Sor() macro

My proposition is to add two keywords to library.

#declare IC_Open=yes;
#declare IC_Close=no;

and then using new type of spline I posted in
http://news.povray.org/20p1du0a7ts1bcl84ikoae1ksfnksob9bg%404ax.com
making sor equivalent is pretty simple:

#macro IC_Sor(Array,Open)
  #local f_sor=sor_spline(Array);
  #if(Open=IC_Close)
    IC_Intersection3(
  #end
  function{f_sphere(x,0,z,f_sor(y))}
  #if(Open=IC_Close)
    ,IC_Plane(y,Array[dimension_size(Array,1)-2].v)
    ,IC_Plane(-y,-Array[1].v))
  #end
#end

#macro IC_BSor(Array,Open)
  IC_Sor(Array,Open),
  sor{
    #local N=dimension_size(Array,1);
    N
    #local n=0;
    #while(n<N)
      Array[n]
      #local n=n+1;
    #end
  }
#end

Now I'll start rounded version to preserve linear distance to shape.
I hope it will be possible :-)

ABX


Post a reply to this message

From: Christoph Hormann
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 2 May 2002 04:17:21
Message: <3CD0F60F.B1D07B0D@gmx.de>

> 

> wrote:
> > Here is proposition ...
> 
> ... IC_Sor() macro
> 
> [...]

Nice.  I will add it in the next version.

> 
> Now I'll start rounded version to preserve linear distance to shape.
> I hope it will be possible :-)

I doubt it.  I remember some discussion about calculating a parallel to a spline for
rounding a text object and it seems very problematic.  SOR might be feasible though.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 26 Apr. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From:
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 6 May 2002 10:36:24
Message: <gn4dduk71uhbjtoojjbhm6lfn15a60g60i@4ax.com>
On Thu, 02 May 2002 10:17:19 +0200, Christoph Hormann <chr### [at] gmxde>
wrote:
> I doubt it.  I remember some discussion about calculating a parallel to a spline for
> rounding a text object and it seems very problematic.  SOR might be feasible though.

I investigated the problem and found solution for future. I have simplified
equations to one calculation for given segment of spline and point
coordinates. Unfortunatelly linear distance to spline is smallest positive
root of 7th order polynomial. It can't be easy calculated in with current set
of functions but I think I'll try to make patch with bridge between functions
and Solve_Polynomial function from polysolv.h. Or perhaps somebody knows
better solution ?

ABX


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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