The maximum object size (normally) you can create is a 10x10x10m cube. You can reshape this up in different ways (like a cylinder) but with the premise of making a simple house/room I created a couple of scripts to make giant cubes and domes using a 10x10x0.025m panel as a building block.
My recent experiment was to create a script to use these flat panels to make an N-sided polygon shaped wall in a ring around my avatar. The only tricky bit of math is the distance between the centre point (my avatar) and the 10m wide panel.
This formula does the trick:
distance =
You can work this out by thinking about the right-angled triangle between the avatar, middle of the panel and the edge where the next panel joins:- The base of the triangle shown must be ½ the panel width
- the angle "a" cuts up the circle into 2xN triangles (a full circle is 2π in radians) and so "a" = 2π/2N = π/N.
- Basic trigonometry gives us the tangent of "a" equal to the opposite side (which we know) over the adjacent side (which is the distance we want).
No comments:
Post a Comment