Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualizing surface without ordering control points #169

Open
thoeschler opened this issue Aug 29, 2023 · 3 comments
Open

Visualizing surface without ordering control points #169

thoeschler opened this issue Aug 29, 2023 · 3 comments

Comments

@thoeschler
Copy link

Hi!

is it possible to visualize a surface without specifying the number of control points in the respective directions u and v? Mathematically, this is not required for visualization.

In my example I simply have a list of control points in random order. The examples in https://github.com/orbingol/geomdl-examples/tree/master/surface require that the points are given in a specific order.

Best regards,
Thilo

@orbingol
Copy link
Owner

Hi @thoeschler,

Just for visualization of the surface, the only thing you need is the evaluated points, i.e. evalpts property. Control points, knot vectors and polynomial degree are required to compute the evaluated points. For sure, it is possible to visualize the control point grid alone and even add the parametric dimensions to that graph, if it makes sense.

The order of control points or evaluated points is not required for visualization. You can run a tessellation algorithm on the points (most assume the input as a point cloud) or just visualize the points as small spheres or use any external visualizer, e.g. Paraview. The visualizers in the geomdl.visualization package are just examples which are created with the intention of illustrating extensibility options.

Hope these help.

@thoeschler
Copy link
Author

Hi,
thanks for your answer. I actually mixed something up. For surface definition you have to order the control points. I found a way to get them in ordered form.

I have another question. Is it already possible to plot both curves and surfaces in the same figure?
CurveContainer and SurfaceContainer and render only work for either of the two.

@orbingol
Copy link
Owner

orbingol commented Sep 8, 2023

For evaluation of the surface, yes, you have to have the ordered points, but you asked for visualization, and it is not necessary to order any points for that.

Containers does not support containing or visualization of mixed geometries at this time. You may extend the base class and add any feature you would like to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants