Message 1 of 15
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi folks. I have couple of questions regarding point tangents.
1 How to ensure tangents end up as intended?
I assume it's related to tangents being close to limits. It becomes "order-sensitive". If I set inTangent before outTangent for point 3, it looks as if it was bezier-corner because inTangent is forced to 0.
In this case I can just hack it by changing order, but if I would try to create a curve with unknown number of bezier-smooth points it would be a problem.
2 What am I doing wrong here?
Tangents are broken for point 2. X is 0 even though in this point it's small enough to stay within limits.
(
rollout roll_test "rolName" (
CurveControl cc_test "Curve Control:"
height:400
width:400
align:#center
numCurves:1
visible:true
x_range:[0,1]
y_range:[0,1]
scrollValues:[0,0]
commandMode:#move_xy
button b_dumpInfo "dump info"
on roll_test open do (
with undo off (
local crv1 = cc_test.curves[1]
crv1.width = crv1.disabledWidth = 2
crv1.color = blue
crv1.style = #solid
crv1.numPoints = 4
crv1.points[1].value = [0.0, 0.0]
crv1.points[2].value = [0.4,0.1]
crv1.points[2].corner = false
crv1.points[2].bezier = true
crv1.points[2].inTangent = [-0.04,-0.04]
crv1.points[2].outTangent = [0.04,0.04]
crv1.points[3].value = [0.6,0.9]
crv1.points[3].corner = false
crv1.points[3].bezier = true
crv1.points[3].outTangent = [0.11,0.11]
crv1.points[3].inTangent = [-0.11,-0.11]
crv1.points[4].value = [1.0, 1.0]
zoom cc_test #all
)
)
on b_dumpInfo pressed do (
crv = cc_test.curves[1]
for i = 1 to crv.numPoints do (
format "% .value %\n" i (crv.points[i].value)
format "% .inTangent %\n" i (crv.points[i].inTangent)
format "% .outTangent %\n" i (crv.points[i].outTangent)
format "---\n"
)
)
)
createdialog roll_test 500 526
)
Solved! Go to Solution.