Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to add a new point with a smooth curve?
#3
(03-19-2021, 07:13 PM)athos_k Wrote: Hello

Excuse my crude drawing, but essentially I want to add two points by code and have a trajectory like in the picture.

I'm using .Add() and changing their rotation afterwards but ofc this only gives me a straight line

[Image: trajectory.jpg]

So how would I go about doing this? anyone got a lead?

Thanks

It depends on what your need to do, but often times setting a spline's interpolation mode to Bezier, then setting the Bezier handles of the control points gives the most flexible solution:
See CurvySplineSegment.HandlesIn and similar, and CurvySpline.Interpolation
In general, whatever you want to do via code, do it first via the editor, and see if you get the expected result. Rotating a control point via editor will not get the result you expect (or at least what I understand is your expectation)
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Messages In This Thread
RE: How to add a new point with a smooth curve? - by _Aka_ - 03-21-2021, 07:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Bezier subdevision not smooth (sometimes) Kapistijn 1 480 02-08-2026, 08:40 PM
Last Post: _Aka_
  Control Point Interpolation Overrides. rickgplus 1 523 12-11-2025, 08:52 AM
Last Post: _Aka_
  12_Train junction point richardzzzarnold 5 3,407 04-16-2025, 02:19 PM
Last Post: _Aka_
  OnAfterControlPointAdded - Control Point is null jh092 5 3,171 02-04-2025, 09:31 PM
Last Post: _Aka_

Forum Jump: