ladybug-tools / bsdf-viewer

🎇 A web-based viewer for BSDF files
https://www.ladybug.tools/bsdf-viewer/
GNU General Public License v3.0
2 stars 3 forks source link

Thoughts on drawing TensorTree hemispheres #5

Closed mostaphaRoudsari closed 5 years ago

mostaphaRoudsari commented 5 years ago

This is related to #3 but I thought I should start a new issue for this specific topic.

I did re-wrote @andyrew's implementation for drawing incident patches last night. The way the script works is that it draws the patches as line segments and circles. It works but it has a number of limitation - specially when it is used for outgoing hemisphere:

I think we should implement this projection as a D3 Projection (https://github.com/d3/d3-geo/blob/master/README.md#projections) and then just use the projection to draw the patches like a champ! This will address both of the above issues and it can potentially make the second one much easier. We can run the Boolean operations before the projection on square shapes and then project the final shape in one go!

There is only one challenge: As of now I have no idea how to implement a new projection for D3 and I'm not sure when I get some quality free time to learn about it and implement it. Meanwhile I hope someone else figures this out!

mostaphaRoudsari commented 5 years ago

Exported_50

mostaphaRoudsari commented 5 years ago

the projection idea worked smoothly. now is the time to try merging paths into a single path for outgoing hemisphere:

image

theo-armour commented 5 years ago

Quite stunning!

Would you like to see a Three.js version?

mostaphaRoudsari commented 5 years ago

@theo-armour thanks!

Would you like to see a Three.js version?

I would love to but once we have #3 figured out. It will change the geometry and hence the Three.js model. It can actually be quite interesting to see it in 3D. 👍