add box point generation

This commit is contained in:
John Alanbrook 2024-06-07 00:39:37 -05:00
parent ecf3859067
commit b2a466ce8b

View file

@ -1,4 +1,9 @@
var shape = {}; var shape = {};
shape.box = {};
shape.box.points = function(ll, ur)
{
return [ll, ll.add([ur.x-ll.x,0]), ur, ll.add([0,ur.y-ll.y])];
}
shape.sphere = {}; shape.sphere = {};
shape.circle = {}; shape.circle = {};
shape.sphere.volume = function(r) { return Math.pi*r*r*r*4/3; }; shape.sphere.volume = function(r) { return Math.pi*r*r*r*4/3; };