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

Using the BasicNurbsSurface class #7

Open
co-ord opened this issue Dec 18, 2018 · 6 comments
Open

Using the BasicNurbsSurface class #7

co-ord opened this issue Dec 18, 2018 · 6 comments

Comments

@co-ord
Copy link

co-ord commented Dec 18, 2018

Dear toxi,

I'd like to use the BasicNurbsSurface class but haven't found a single example sketch on the web and it seems the corresponding Javadoc is missing.

Would you mind sharing a very basic example sketch demonstrating how to handle a nurb surface with toxiclibs ?

Respectfully,

solub

@co-ord
Copy link
Author

co-ord commented Dec 31, 2018

@postspectacular Pardon my insistence, I've looked and asked almost everywhere about this but to no avail. I would be immensely grateful if you could provide a minimal example showing how to use a NurbsSurface with toxiclibs.

@postspectacular
Copy link
Owner

Few days ago I've been looking through some of my backups, but still haven't found a small enough example to share. Will have another look tomorrow... Btw. to give you an idea of some basic possibilities, see: https://www.flickr.com/photos/toxi/tags/nurbs

@co-ord
Copy link
Author

co-ord commented Jan 1, 2019

These nurbs are beautiful Karsten ! I wouldn't mind a more complex example, anything would be fine really.

@co-ord
Copy link
Author

co-ord commented Jan 2, 2019

@postspectacular Could you at least please tell me how to instantiate the NurbsSurface class ? Just a snippet of any of your examples would be fine. Please !

@postspectacular
Copy link
Owner

I'm sorry this is taking so long, but please understand that it's not as straightforward for me to dig out and through backed up projects from 10 years ago, nor is this a high priority from my side... In the meantime do have a look at the dozen or so static methods in the NurbsCreator class:

Once you have a NurbsSurface instance built, you can then pass it to the NurbsMeshCreator to convert the surface to triangle mesh with customizable resolution:

https://github.com/postspectacular/toxiclibs/blob/master/src.core/toxi/geom/nurbs/NurbsMeshCreator.java

The difference between createControlMesh() and createMesh() is that the former constructs a mesh from the surface's control points, whereas the latter performs the full nurbs interpolation and results in a smooth surface representation (depending on chosen resolution)...

@co-ord
Copy link
Author

co-ord commented Jan 10, 2019

Thank you Karsten. I'll have a look at it and will try to post a basic example here for future users.

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