|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Using my curves macro:
---%<---%<---%<---
#version 3.7;
#include "curve.inc" //https://ingoogni.nl/download/Curve.zip
#global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.9 emission 0}}
#declare vT = array[2]{0, 1}
#declare vC = array[13]{
<1.500000, 0.000000, 0>,
<1.500000, 0.450694, 0>,
<0.450694, 1.000000, 0>,
<0.000000, 1.000000, 0>,
<-0.450694, 1.000000, 0>,
<-1.500000, 0.450694, 0>,
<-1.500000, 0.000000, 0>,
<-1.500000, -0.450694, 0>,
<-0.450694, -1.000000, 0>,
<0.000000, -1.000000, 0>,
<0.450694, -1.000000, 0>,
<1.500000, -0.450694, 0>,
<1.500000, 0.000000, 0>
}
#declare Test = CIt(CIlinear(vT), CIbezier3(vC));
//get the points on the curve
#for(T, 0, 1, 0.005)
sphere{CITget(Test, T), 0.02 pigment{rgb 1}}
#end
//control points
sphere{Test[1][1][0] 0.03 pigment{rgb <1,0,0>}}
#for(i, 1, dimension_size(Test[1][1],1) - 1)
sphere{Test[1][1][i] 0.03 pigment{rgb <1,0,0>}}
cylinder{Test[1][1][i-1], Test[1][1][i], 0.01 pigment{rgb <1,0,0>}}
#end
camera {
perspective angle 45
location <0, 0, -6>
right x*image_width/image_height
look_at <0, 0, 0.0>
}
light_source{<0, 0,-3000> color rgb 1}
---%<---%<---%<---
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"ingo" <nomail@nomail> wrote:
Post a reply to this message
Attachments:
Download 'bez_test.png' (29 KB)
Preview of image 'bez_test.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 15/03/2023 10:13, ingo wrote:
> Using my curves macro:
Thank you for this test, POV leads 2:0 now. It seems that C4D has some
hidden spline rendering magic. I will ask MAXON support now...
--
YB
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 15/03/2023 07:11, Mike Miller wrote:
> I'll take a look. Have you tried plotting those same points in another package?
> ...like AutoCAD or FreeCAD. Did you try adding a tolerance? I doubt it would
> matter.
No, I have no them, maybe some online tools...
Also will try to ask MAXON support - they answer very quickly.
--
YB
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 15/03/2023 10:47, yesbird wrote:
> It seems that C4D has some hidden spline rendering magic.
This is a Matlab version of cubic spline (attached):
------------------------------------
fnplt(cscvn( [1.5 0 -1.5 0 1.5; ...
0 1 0 -1 0] ))
------------------------------------
details are here:
https://www.mathworks.com/help/curvefit/cscvn.html?searchHighlight=cscvn&s_tid=srchtitle_cscvn_1
Score is 2:2 now ...
--
YB
Post a reply to this message
Attachments:
Download 'c4d_spline.png' (22 KB)
Preview of image 'c4d_spline.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
yesbird <sya### [at] gmailcom> wrote:
> On 15/03/2023 10:47, yesbird wrote:
Cubic splines are hard to compare. What cubic is used by whom?
Inkscape bezier:
Post a reply to this message
Attachments:
Download 'inkscape_bezier.jpg' (108 KB)
Preview of image 'inkscape_bezier.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"ingo" <nomail@nomail> wrote:
> yesbird <sya### [at] gmailcom> wrote:
> > On 15/03/2023 10:47, yesbird wrote:
>
> Cubic splines are hard to compare. What cubic is used by whom?
Cubic B-spline using my curve macros
---%<------%<------%<---
#version 3.7;
#include "curve.inc" //https://ingoogni.nl/download/Curve.zip
#global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.9 emission 0}}
#declare Bspl3 = CIbspline3(
array[7]{
<0.000000, -1.000000,0>
<1.500000, 0.000000,0>
<0.000000, 1.000000,0>
<-1.500000, 0.000000,0>
<0.000000, -1.000000,0>
<1.500000, 0.000000,0>
<0.000000, 1.000000,0>
}
)
//get the points on the curve
#for(T, 0, 1, 0.005)
sphere{CIget(Bspl3, T), 0.02 pigment{rgb 1}}
#end
//control points
sphere{Bspl3[1][0] 0.03 pigment{rgb <1,0,0>}}
#for(i, 1, dimension_size(Bspl3[1],1) - 1)
sphere{Bspl3[1][i] 0.03 pigment{rgb <1,0,0>}}
cylinder{Bspl3[1][i-1], Bspl3[1][i], 0.01 pigment{rgb <1,0,0>}}
#end
camera {
perspective angle 45
location <0, 0, -6>
right x*image_width/image_height
look_at <0, 0, 0.0>
}
light_source{<0, 0,-3000> color rgb 1}
---%,------%<------%<---
Post a reply to this message
Attachments:
Download 'test4.png' (22 KB)
Preview of image 'test4.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 15/03/2023 14:29, ingo wrote:
>> Cubic splines are hard to compare. What cubic is used by whom?
As I was expected, looks like the reason is default location of control
points, no any magic here.
--
YB
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 2023-03-15 à 03:30, ingo a écrit :
> "ingo" <nomail@nomail> wrote:
>
>
>
I see the problem. Your spline is not «stiff» enough.
Try pushing the control points back. That'll make the spline flatter at
the placement points.
Try this :
#declare vC = array[13]{
<1.500000, 0.000000, 0>,//P
<1.500000, 0.6, 0>,//C
<0.47, 1.000000, 0>,//C
<0.000000, 1.000000, 0>,//P
<-0.47, 1.000000, 0>,//C
<-1.500000, 0.6, 0>,//C
<-1.500000, 0.000000, 0>,//P
<-1.500000, -0.6, 0>,//C
<-0.47, -1.000000, 0>,//C
<0.000000, -1.000000, 0>,//P
<0.47, -1.000000, 0>,//C
<1.500000, -0.6, 0>,//C
<1.500000, 0.000000, 0>//P
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain Martel <kua### [at] videotronca> wrote:
> > "ingo" <nomail@nomail> wrote:
> >
> >
> >
> Try pushing the control points back. That'll make the spline flatter at
> the placement points.
Thanks Alain, I'm aware of that, just tried to show that the POV-Ray
implementation of the Bezier spline is not wrong using yesbird's data and
various implementations.
ingo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|