Spline Tubes & Lathe Ceramic Vessels (Opaque)

Contents Previous Next

Install

npm install -g @lmctl-ai/lmctl

lmvideo 0.1.38 is released. Source examples are pinned to public commit aab2677.

Download lmvideo 0.1.38

Original lathe profiles produce opaque ceramic vessels beside a closed Frenet-frame spline knot and a companion vessel.

Verified acceptance capture, reproducible with the lmvideo 0.1.38 prerelease runtime.

Run this example

lmctl autorun https://raw.githubusercontent.com/lmctl-ai/lmvideo/aab2677a4b6264ae6afae8ad64a1d7c1dcd3a052/examples/showcase/bench-08-lathe-closed-knot.lms

Source

# B08: original lathe ceramics and a closed Frenet-frame spline knot.
mkdir("build"); program=_lmcode_ cli="lmvideo" install="github:lmctl-ai/lmvideo@v0.1.38";
let scene=scene3d().threads(4).background("#eaf0f6").ambient(0.2); scene.camera(camera3d().look_at(6.0,4.0,8.0,0.0,0.6,0.0).perspective(42.0,0.1,100.0));
let vase=mesh_lathe("0,0,0,0.72,0.04,0,1.02,0.5,0,0.62,1.3,0,0.5,1.8,0,0.65,2.0,0",48); scene.add(vase,material("#359b9a",0.12,0.3)).position(-1.9,-0.5,0.0);
let knot=mesh_tube_spline("0,0,0,0.9,1,0,1.8,1,-0.6,2.4,0,-1,1.8,-0.6,0,0.9,-1,0",0.13,18,true); scene.add(knot,material("#de7656",0.08,0.26)).position(-0.9,0.2,0.0);
scene.add(mesh_lathe("0,0,0,0.32,0.05,0,0.42,0.35,0,0.24,0.72,0,0.38,0.82,0",40),material("#d7aa4a",0.4,0.24)).position(2.0,-0.4,0.0); scene.directional_light(1.0,3.0,4.0,"#fff",1.0); let image=scene.render_image(900,560,2); image.save("build/bench-08-lathe-closed-knot.png"); image_assert_true(vase.triangles()>100&&knot.triangles()>100);
end _lmcode_
 let r=run_lmcode(program); assert(r.ok,(r.ok ? "" : r.message));println(json_stringify(r.result));

Raw LMScript source

Ceramic vessels beside a looped knot-shaped tube.
Compare the vessel profiles with the continuous curved tube.