|
![](/i/fill.gif) |
> 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
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
>
> 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
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Thu, 02 May 2002 10:17:19 +0200, Christoph Hormann <chr### [at] gmx de>
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
|
![](/i/fill.gif) |