Package org.jzy3d.plot3d.primitives
Class RandomGeom
java.lang.Object
org.jzy3d.plot3d.primitives.RandomGeom
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
aFloat()
Generate a float between 0 and 1float
aFloat
(float range) Generate a float between 0 and rangecolor()
Build a color based on the input coord values.coord()
coord
(float xrange, float yrange, float zrange) cube()
cube
(int xyz) cube
(int x, int y, int z) cube
(int x, int y, int z, int w, int h, int d) cubes
(int cubes) boolean
isAlpha()
poly
(int x, int y, int z) poly
(int x, int y, int z, int w, int h) Return a polygon at specified position, width and height.void
setAlpha
(boolean alpha) spinningCubes
(int cubes, float spin) spinningCubes
(int cubes, float spin, float randomize) Generate a stack of cubes, where the top face is spinned w.r.t. the bottom face.generate a random viewpoint according to the expected values ofView.setViewPoint(Coord3d, boolean)
-
Constructor Details
-
RandomGeom
public RandomGeom() -
RandomGeom
public RandomGeom(long seed)
-
-
Method Details
-
isAlpha
public boolean isAlpha() -
setAlpha
public void setAlpha(boolean alpha) -
coord
-
coord
-
color
-
color
-
viewpoint
generate a random viewpoint according to the expected values ofView.setViewPoint(Coord3d, boolean)
-
color
Build a color based on the input coord values. -
aFloat
public float aFloat()Generate a float between 0 and 1 -
aFloat
public float aFloat(float range) Generate a float between 0 and range -
spinningCubes
-
spinningCubes
Generate a stack of cubes, where the top face is spinned w.r.t. the bottom face. The left, right, near and far faces are consequently not planar which is usefull to validate some algorithms. Each cube is aComposite
which in returned in a list ofDrawable
s.- Parameters:
cubes
- number of cubes in the stackspin
- the rotation angle in degree between the bottom and top facerandomize
- is the factor applied to a random number generator before adding a "shaking" offset to each coordinate
-
cubes
-
cube
- Parameters:
x
- starting point Xy
- starting point Yz
- starting point Zw
- width (allows building ending point X)h
- height (allows building ending point Y)d
- depth (allows building ending point Z)
-
cube
-
cube
-
cube
-
poly
-
poly
-
poly
Return a polygon at specified position, width and height. Width is either applied to X or Z according to the boolean parameter.- Parameters:
x
-y
-z
-w
- widthh
- heightleftRightOrNearFar
- if true, width is applied along X, otherwise along Z dimension.color
-- Returns:
-
poly
-