ladybug-tools / spider

:spider_web: 3D interactive analysis in your browser mostly written around the Three.js JavaScript library
http://www.ladybug.tools/spider
44 stars 15 forks source link

Pts Viewer R1 ~ Radiance RES * PTS files to bitmaps #128

Closed theo-armour closed 6 years ago

theo-armour commented 6 years ago

image

This is a screen capture of a failed attempt to turn Radiance data exported by Grasshopper into bitmaps that could be used as textures to colorize Three,js Shapes. The squares are drawn slightly smaller than the grid size to help with error checking by eye.

It all looks doable, but I think I would be an old man bu the time it was finished. ;-)

PTS files are random groups of points somewhere in a 3D world. Origin is at lower left. The origin is often at the center of the model. Y direction is down

To become textures the data is converted to HTML canvas format. Origin is at top left. Y direction is down. the origin must be outside of the model id the entire model is to e visible. A window of specific size and location must be specified.

To color the Three.js shape the texture is converted to material and applied to the shape. Origin is at the center of the shape. Y direction is Up. Materials are expected to be square and are stretched to fit the boundaries of the shape. Scaling is arbitrary.

image

image The above images show typical groups of points. There is no indication as to what surface a point belongs to.

If this project is to continue then the next step is like to be to create a bounding box for every floor surface The take every point and test it against every surface to establish which surface a point belongs to