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

uv() method in ISurface has a problem at the seams #4

Open
ghost opened this issue Nov 11, 2013 · 1 comment
Open

uv() method in ISurface has a problem at the seams #4

ghost opened this issue Nov 11, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 11, 2013

When using the uv() function to project a point (IVec) on to a surface, there seem to be a problem if the surface is closed (like a tube or a cylinder).

A picture is worth a thousand words so :

capture decran 2013-11-11 a 21 56 58
The black line is where the UV coordinates wrap back, the red dots are projected through the yellow arrow to the magenta points. Around the seam, the projected points end up on the seam instead of their normal place.

Also, every 10 points or so, the projection is a bit off. Dunno if it's related or not...

I hope this can help correcting it !

@sghr
Copy link
Owner

sghr commented Nov 13, 2013

Thank you for pointing out the issue.
I haven't found time to work on it yet but when I do I'll let you know.
The issue on the edge of the surface seems to be something I should fix but another issue of being off every 10 points are due to the quick approximation algorithm I use.

Mapping from uv -> xyz is mathematically precise but invert mapping of xyz -> uv is approximation and more precise approximation requires more CPU time. If you know an efficient and highly precise algorithm, let me know.

Thanks,
Satoru

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

1 participant