POV-Ray : Newsgroups : povray.newusers : Prism Conceptual Question : Re: Prism Conceptual Question Server Time
7 Jul 2024 07:50:16 EDT (-0400)
  Re: Prism Conceptual Question  
From: bart
Date: 27 Jan 2010 20:53:30
Message: <4b60ee1a$1@news.povray.org>
>Bart as you correctly said I can use this as a starting point
 >and I will continue to investigate beziers.

you will not regret, it's truly amazing subject

 >However I think (could be wrong) your solution only works
 >if the two lines either side of the corner are the same
 >length... for example this does not work...

true, that was a very raw example.
You need to edit Corner() macro to suit your own needs.
As Alain pointed out, you may need to subdivide the curved parts,
so the modified Corner() macro could generate several
cubic Bezier segments to fit the path you need.

 >but I say again it does give me a start point to think about.

Meanwhile, you can try this simple one:
//======================8<=================
#macro Corner(P,Q,R,S)
    #local A=Q;
    #local D=R;
    #local B=Q+(Q-P)/vlength(Q-P);
    #local C=R+(R-S)/vlength(R-S);
    A,B,C,D
#end
//======================8<=================


Post a reply to this message

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