GLOW
GLOW copied to clipboard
Visualization of Curve
Hello,
I wanted to use GLOW to visualize multiple 3D curve. I wanted to create a json file which can be accepted by GLOW for the Curve data which looks like: [[x1,y1,z1,x2,y2,z2 ...... xn1,yn1,zn1],[x1,y1,z1,x2,y2,z2 ...... xn2,yn2,zn2] ..... for nth curve]
n1, n2 ... are number of points for each curve.
Please suggest how and if I can visualize this type of data sets in GLOW.
Thanks, Sudhir
Hey! GLOW accepts any kind of data and visualization - whatever you can dream up. You can use the GLOW.Load to load your JSON but then you need to parse it yourself and make it ready for your shader.
I'm not 100% sure how you will calculate the curves from these points (is it splines/bezier?), but probably you should have the control points as uniforms (if not too many for each curve) and then have one Float32Array of vertices and another Float32Array telling which control point uniform(s) is affecting the vertex. In your vertex shader you do the curve calculation using this data. When updating the uniform positions, the curves will move.
Did that help? :D /m