add box point generation
This commit is contained in:
parent
ecf3859067
commit
b2a466ce8b
|
@ -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; };
|
||||||
|
|
Loading…
Reference in a new issue