Curves described by parametric equations?
-
Is it possible (in JSCAD) to draw a curve in space defined by parametric equations x = x(t), y = y(t), z = z(t) over an interval of t? What I want to do is to draw a cylinder with a sort of "wavy" top; in my case the shape of the edge can be given as a parametric curve.
Thanks!
-
Thank you very much - and I think that hand-building a polygon from a list of points may be my best bet at the moment. I can easily create points from my parametric equations, and then join them up.
-
@Alasdair-McAndrew are you looking for something like the Simple Bezier Extrude example? that uses a two curves to extrude a shape in 3D space.
Code is here... (sorry you cannot see online yet)
https://github.com/jscad/OpenJSCAD.org/blob/V2/packages/examples/core/curves/bezier/simpleExtrude.js
-
I cannot help you with math, but there are at least 3 ways to achieve what you want to do :
- extrudeFromSlices
- extrude along a bezier path
- hand build a polyhedron
There are lots of examples using fromSlices on v1 website, they almost all use math functions, and there's also a very (very) complex example of polyhedron hand built from math, that creates a knot ring which form wavy surfaces. Bezier path is one of the new v2 examples.