Package rope.core
Class Rope
java.lang.Object
rope.core.Rope
- All Implemented Interfaces:
R_Constants
,R_Constants_Colour
-
Field Summary
Fields inherited from interface rope.core.R_Constants
ARC, BEZIER_VERTEX, BLANK, BOTTOM, BOX, BREAK, CARTESIAN, CENTER, CHAOS, CHOICE, CHORD, CIRCULAR, CLOSE, CLOUD, CORNER, CORNERS, COS, CROSS, CROSS_BOX_2, CROSS_BOX_3, CROSS_RECT, CUBE_LINE, CURVE_VERTEX, DECAGON, DIAGONAL, DIAMETER, DODECAGON, DOWN, DRAW, DXF, DYNAMIC, EAST, ELLIPSE, EQUATION, EULER, FIRST, FIT, FLOWER, FLUID, FX2D, G, GOLD_ANGLE, GOLD_NUMBER, GRAVITY, HALF, HALF_PI, HENDECAGON, HEPTAGON, HEXAGON, HORIZONTAL, HOUSE, HPI, ICOSI_DODECAHEDRON_LINE, IMAGE, JAVA2D, LANDSCAPE, LAST, LEAF, LEFT, LINE, LINEAR, MAD, MAGNETIC, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MIX, NEXT, NONAGON, NONE, NORMAL, NORTH, NORTH_EAST, NORTH_WEST, NOTCH, NOTHING, NULL, OCTOGON, OCTOHEDRON_LINE, OPEN, ORDER, P2D, P3D, PDF, PENTAGON, PERLIN, PHI, PI, PIE, PIXEL, POINT, POLAR, POLYGON, PORTRAIT, POW, PREVIOUS, QPI, QUADRATIC_VERTEX, QUARTER_PI, RADIUS, RAND, RECT, REPEAT, RHOMBIC_COSI_DODECAHEDRON_SMALL_LINE, RIGHT, ROOT, ROOT2, RUN, SCALE, SEED, SHAPE, SIN, SKY, SOUTH, SOUTH_EAST, SOUTH_WEST, SPAN, SPHERE, SPHERE_HIGH, SPHERE_LOW, SPHERE_MEDIUM, SPIRAL, SQUARE, STAR, STAR_3D, STATIC, SVG, TAN, TAU, TETRAHEDRON, TETRAHEDRON_LINE, TEXT, TOP, TREE, TRIANGLE, TWO_PI, UP, VERSION, VERTEX, VERTICAL, VIRUS, WALK, WEST
Fields inherited from interface rope.core.R_Constants_Colour
ABRICOT, ACAJOU, ALPHA, AMARANTE, AMBRE, ANSI_BLACK, ANSI_BLACK_BACKGROUND, ANSI_BLUE, ANSI_BLUE_BACKGROUND, ANSI_CYAN, ANSI_CYAN_BACKGROUND, ANSI_GREEN, ANSI_GREEN_BACKGROUND, ANSI_PURPLE, ANSI_PURPLE_BACKGROUND, ANSI_RED, ANSI_RED_BACKGROUND, ANSI_RESET, ANSI_WHITE, ANSI_WHITE_BACKGROUND, ANSI_YELLOW, ANSI_YELLOW_BACKGROUND, ARGB, ARGENT, AUBERGINE, AZUR, BIS, BISTRE, BLACK, BLANC, BLEU, BLOND, BLOOD, BLUE, BOUTEILLE, BRIGHTNESS, BRIQUE, BRONZE, BROWN, CAERULEUM, CAFE, CANARD, CANELLE, CAPUCINE, CARMIN, CARMINE, CAROTTE, CELESTE, CERISE, CHAMOIS, CHARTREUSE, CHOCOLAT, CIEL, CITROUILLE, COBALT, COFFEE, COLOMBIN, CORAIL, CYAN, EVEQUE, FRANCE, FUSCHIA, GOLD, GRADIENT, GRADIENT_BRIGHTNESS, GRADIENT_HUE, GRADIENT_SATURATION, GRAY, GRAY_MEDIUM, GREEN, GRENAT, GRIS, GRIS_MOYEN, GUEULES, HSB, HUE, IMPERIAL, JAUNE, LAPIS_LAZULI, LAVANDE, LILAS, LIME, LIN, LUNE, MAGENTA, MANDARINE, MARRON, MAUVE, MIMOSA, MOON, MOUNTBATTEN, NANKIN, NAPLE, NOIR, NOISETTE, NUIT, OCRE, OCRE_JAUNE, OCRE_ROUGE, OLIVE, OR, ORANGE, OUTREMER, PALETTE, PAYNE, PERLE, PERROQUET, PINK, PISTACHE, POURPRE, PRUNE, PURPLE, RAINBOW, RED, RGB, RGBA, ROSE, ROUGE, SANG, SAPIN, SATURATION, SAUGE, SEPIA, SHAKUDOU, SILVER, SINOPLE, SMALT, SOURIS, SPECTRUM, TAUPE, TILLEUL, TURQUOISE, VERMILLON, VERT, VERT_D_EAU, VERT_DE_GRIS, VESSIE, VIOLET, WHITE, YELLOW, ZINZOLIN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
abs
(float arg) int
abs
(int arg) each element add of each vector mult each one in the orderboolean
all
(boolean... list) boolean
boolean
any
(boolean... list) boolean
float
atan
(float value) barycenter
(vec2... v) barycenter
(vec3... v) barycenter
(vec4... vector) binary
(byte value) binary
(char value) binary
(int value) binary
(int value, int digits) Converts an int, byte, char, or color to a String containing the equivalent binary notation.int
ceil
(float value) float
clamp
(float x, float min, float max) float
constrain
(float amt, float low, float high) int
constrain
(int amt, int low, int high) Constrains a value to not exceed a maximum and minimum value.float
cos
(float value) Cross product of vec3float
dist
(float x1, float y1, float x2, float y2) float
dist
(float x1, float y1, float z1, float x2, float y2, float z2) float
float
float
boolean
equal
(float x, float y) boolean
equal
(int x, int y) boolean
extension_is
(String filename, String... extension) remove the path of your String to return the file name of it.int
floor
(float value) float
fract
(float x) get_os()
boolean
greaterThan
(float x, float y) boolean
greaterThan
(int x, int y) greaterThan
(ivec2 x, ivec2 y) greaterThan
(ivec3 x, ivec3 y) greaterThan
(ivec4 x, ivec4 y) greaterThan
(vec2 x, vec2 y) greaterThan
(vec3 x, vec3 y) greaterThan
(vec4 x, vec4 y) boolean
greaterThanEqual
(float x, float y) boolean
greaterThanEqual
(int x, int y) greaterThanEqual
(ivec2 x, ivec2 y) greaterThanEqual
(ivec3 x, ivec3 y) greaterThanEqual
(ivec4 x, ivec4 y) greaterThanEqual
(vec2 x, vec2 y) greaterThanEqual
(vec3 x, vec3 y) greaterThanEqual
(vec4 x, vec4 y) hex
(byte value) hex
(char value) hex
(int value) hex
(int value, int digits) boolean
boolean
in_polygon
(vec[] points, vec pos) boolean
in_polygon
(vec[] points, vec pos, float marge) int
index_pixel_array
(int x, int y, int width) boolean
lessThan
(float x, float y) boolean
lessThan
(int x, int y) boolean
lessThanEqual
(float x, float y) boolean
lessThanEqual
(int x, int y) lessThanEqual
(ivec2 x, ivec2 y) lessThanEqual
(ivec3 x, ivec3 y) lessThanEqual
(ivec4 x, ivec4 y) lessThanEqual
(vec2 x, vec2 y) lessThanEqual
(vec3 x, vec3 y) lessThanEqual
(vec4 x, vec4 y) float
map
(float value, float start1, float stop1, float start2, float stop2) map methodfloat
max
(float... list) int
max
(int... list) float
min
(float... list) int
min
(int... list) float
mix
(float x, float y, float a) float
mod
(float x, float y) each element multipry of each vector mult each one in the orderboolean
only
(boolean... list) boolean
float
pow
(float arg, float exp) void
void
print_err_tempo
(int tempo, Object... obj) void
void
print_tempo
(int tempo, Object... obj) projection
(float angle) polar projection 2Dprojection
(float angle, float radius) projection
(vec2 direction) Projectionprojection
(vec2 direction, float radius) projection
(vec2 direction, vec2 origin, float radius) projection
(vec3 direction) Cartesian projection 3Dprojection
(vec3 direction, float radius) projection
(vec3 direction, vec3 origin, float radius) float
random
(float high) float
random
(float low, float high) float
random_next_gaussian
(float range) float
random_next_gaussian
(float range, int n) float
random_next_gaussian
(int n) int
round
(float value) float
sign
(float x) int
sign
(int x) float
sin
(float value) float
smoothstep
(float edge0, float edge1, float x) smoothstep
(vec2 edge0, vec2 edge1, vec2 x) smoothstep
(vec3 edge0, vec3 edge1, vec3 x) smoothstep
(vec4 edge0, vec4 edge1, vec4 x) String[]
String[]
float
sq
(float value) float
sqrt
(float value) float
step
(float edge, float x) each element substract of each vector mult each one in the orderto_cartesian_2D
(float angle) main method to_cartesian_2Dto_cartesian_2D
(float angle, float radius) to_cartesian_2D
(float pos, vec2 range, vec2 target_rad, float distance) *** ACHTUNG *** It's not clear must find time to work on explanation of this function If I remember is to compare to vec but not sure...to_cartesian_3D
(float latitude, float longitude) to_cartesian_3D
(float latitude, float longitude, float radius) main method to_cartesian_3Dto_cartesian_3D
(vec2 pos, vec2 range, float size) *** ACHTUNG *** It's not clear must find time to work on explanation of this function If I remember is to compare to vec but not sure...float
truncate
(float x) float
truncate
(float x, int num) int
int
Converts a Stringrepresentation of a hexadecimal number to its equivalent integer value.
-
Constructor Details
-
Rope
public Rope()
-
-
Method Details
-
add
each element add of each vector mult each one in the order- Parameters:
a
- vector be addedb
- vector added- Returns:
- result of the operation
-
add
-
add
-
add
-
add
-
add
-
sub
each element substract of each vector mult each one in the order- Parameters:
a
- vector targetb
- vector must be sub- Returns:
- result of the operation
-
sub
-
sub
-
sub
-
sub
-
sub
-
mult
each element multipry of each vector mult each one in the order- Parameters:
a
- vector multiplicatorb
- vector multiplicator- Returns:
- result of the operation
-
mult
-
mult
-
mult
-
mult
-
mult
-
div
- Parameters:
a
- vector must be divide by bb
- vector must divide a- Returns:
- result of the operation
-
div
-
div
-
div
-
div
-
div
-
cross
Cross product of vec3- Parameters:
v1
- coordinatev2
- coordinate- Returns:
- result of the croos operation
-
constrain
public int constrain(int amt, int low, int high) Constrains a value to not exceed a maximum and minimum value. math:calculation Constrains a value to not exceed a maximum and minimum value.- Parameters:
amt
- the value to constrainlow
- minimum limithigh
- maximum limit
-
constrain
public float constrain(float amt, float low, float high) -
map
public float map(float value, float start1, float stop1, float start2, float stop2) map method- Parameters:
value
- value must be computestart1
- min range value of the starting fieldstop1
- max range value of the starting fieldstart2
- min range value of the final fieldstop2
- max range value of the final field- Returns:
- result of the scale map operation
-
dist
public float dist(float x1, float y1, float x2, float y2) - Parameters:
x1
- value x of the first pointy1
- value y of the first pointx2
- value x of the second pointy2
- value y of the second point- Returns:
- float distance beween the two points
-
dist
public float dist(float x1, float y1, float z1, float x2, float y2, float z2) - Parameters:
x1
- value x of the first pointy1
- value y of the first pointz1
- value z of the first pointx2
- value x of the second pointy2
- value y of the second pointz2
- value z of the second point- Returns:
- float distance beween the two points
-
dist
- Parameters:
a
- coordinate of the first pointb
- coordinate of the second point- Returns:
- float distance beween the two points
-
dist
- Parameters:
a
- coordinate of the first pointb
- coordinate of the second point- Returns:
- float distance beween the two points
-
dist
- Parameters:
a
- coordinate of the first pointb
- coordinate of the second point- Returns:
- float distance beween the two points
-
in_line
-
in_polygon
-
in_polygon
-
to_cartesian_3D
*** ACHTUNG *** It's not clear must find time to work on explanation of this function If I remember is to compare to vec but not sure...- Parameters:
pos
- ??? may be the anglerange
- ??? may be be the range of the vec ????size
- ??? may be the distance to center ???- Returns:
-
to_cartesian_3D
- Parameters:
latitude
- latitude in radiantlongitude
- longitude in radiant- Returns:
- the cartesian angle coordinate
-
to_cartesian_3D
main method to_cartesian_3D- Parameters:
latitude
- latitude in radiantlongitude
- longitude in radiantradius
- distance to center- Returns:
- the cartesian angle coordinate
-
to_cartesian_2D
*** ACHTUNG *** It's not clear must find time to work on explanation of this function If I remember is to compare to vec but not sure...- Parameters:
pos
- ??? may be the anglerange
- ??? may be be the range of the first vec ????target_rad
- ??? may be be the range of the last vec ????distance
- distance to center- Returns:
- the cartesian angle coordinate
-
to_cartesian_2D
- Parameters:
angle
- radiant valueradius
- distance to center- Returns:
- the cartesian angle coordinate
-
to_cartesian_2D
main method to_cartesian_2D- Parameters:
angle
- radiant value- Returns:
- the cartesian angle coordinate
-
barycenter
- Parameters:
v
- list coordinate to compute the barycenter- Returns:
- coordinate of the barycenter
-
barycenter
- Parameters:
v
- list coordinate to compute the barycenter- Returns:
- coordinate of the barycenter
-
barycenter
- Parameters:
vector
- array coordinates to calculate the barycenter- Returns:
- vec4 result
-
projection
Projection- Parameters:
direction
- vec2 radiant direction- Returns:
- coordinate of the point
-
projection
- Parameters:
direction
- vec2 radiant directionradius
- distance for the projection- Returns:
- coordinate of the point
-
projection
- Parameters:
direction
- vec2 radiant directionorigin
- positionradius
- distance for the projection- Returns:
- coordinate of the point
-
projection
polar projection 2D- Parameters:
angle
- float radiant direction- Returns:
- coordinate of the point
-
projection
- Parameters:
angle
- float radiant directionradius
- distance for the projection- Returns:
- coordinate of the point
-
projection
Cartesian projection 3D- Parameters:
direction
- vec2 radiant direction- Returns:
- coordinate of the point
-
projection
- Parameters:
direction
- vec2 radiant directionradius
- distance for the projection- Returns:
- coordinate of the point
-
projection
- Parameters:
direction
- vec2 radiant directionorigin
- positionradius
- distance for the projection- Returns:
- coordinate of the point
-
random
public float random(float high) - Parameters:
high
- define value max for the random- Returns:
- random number, this method is a copy of Processing one
-
random
public float random(float low, float high) - Parameters:
low
- define value min for the randomhigh
- define value max for the random- Returns:
- random number, this method is a copy of Processing one
-
random_next_gaussian
public float random_next_gaussian(int n) - Parameters:
n
- the num of operation must iterate each operation is mult by the previous result- Returns:
- random value
-
random_next_gaussian
public float random_next_gaussian(float range) - Parameters:
range
- define value max for the random- Returns:
- random value
-
random_next_gaussian
public float random_next_gaussian(float range, int n) - Parameters:
range
- represente the max value possible from 0 to this value.n
- the num of operation must iterate each operation is mult by the previous result- Returns:
- random value
-
max
public float max(float... list) - Parameters:
list
- list of arguments must be sorted- Returns:
- the max value of the list
-
max
public int max(int... list) -
max
-
max
-
max
-
max
-
max
-
max
-
min
public float min(float... list) - Parameters:
list
- list of arguments must be sorted- Returns:
- the min value of the list
-
min
public int min(int... list) -
min
-
min
-
min
-
min
-
min
-
min
-
abs
public float abs(float arg) - Parameters:
arg
- passed to be transform- Returns:
- absolute value
-
abs
public int abs(int arg) -
abs
-
abs
-
abs
-
abs
-
abs
-
abs
-
floor
public int floor(float value) - Parameters:
value
- must be transform- Returns:
- return int rounded to down
-
floor
-
floor
-
floor
-
ceil
public int ceil(float value) - Parameters:
value
- must be transform- Returns:
- int rounded to up
-
ceil
-
ceil
-
ceil
-
round
public int round(float value) - Parameters:
value
- must be transform- Returns:
- value average rounded value to int.
-
round
-
round
-
round
-
sq
public float sq(float value) - Parameters:
value
- must be squared- Returns:
- the result of the operation
-
sqrt
public float sqrt(float value) - Parameters:
value
- value to compute the squareroot- Returns:
- the result of the operation
-
pow
public float pow(float arg, float exp) - Parameters:
arg
- value must be transform by the expexp
- it's the exponent value to powered- Returns:
- value powered by n
-
atan
public float atan(float value) - Parameters:
value
- value to compute- Returns:
- the result of the operation
-
cos
public float cos(float value) - Parameters:
value
- to compute- Returns:
- the result of the operation
-
sin
public float sin(float value) - Parameters:
value
- to compute- Returns:
- the result of the operation
-
mix
public float mix(float x, float y, float a) - Parameters:
x
- elem to mixy
- elem to mixa
- mixer element- Returns:
- the mix result
- See Also:
-
mix
-
mix
-
mix
-
fract
public float fract(float x) - Parameters:
x
- value to fract- Returns:
- fract result
- See Also:
-
fract
-
fract
-
fract
-
sign
public float sign(float x) - Parameters:
x
- value who find sign- Returns:
- value -1, 0 or 1
- See Also:
-
sign
-
sign
-
sign
-
sign
public int sign(int x) -
sign
-
sign
-
sign
-
step
public float step(float edge, float x) - Parameters:
x
- value to smoothedge
- the smooth edge- Returns:
- the result of the operation
- See Also:
-
step
-
step
-
step
-
smoothstep
public float smoothstep(float edge0, float edge1, float x) - Parameters:
x
- value to smoothedge0
- the smooth first edgeedge1
- the smooth second edge- Returns:
- the result of the operation
- See Also:
-
smoothstep
-
smoothstep
-
smoothstep
-
mod
public float mod(float x, float y) - Parameters:
x
- value to mody
- value to mod- Returns:
- result of operation
- See Also:
-
mod
-
mod
-
mod
-
mod
-
mod
-
mod
-
clamp
public float clamp(float x, float min, float max) - Parameters:
x
- value to clampmin
- the min value availablemax
- the max value available- Returns:
- reslut of operation
- See Also:
-
clamp
-
clamp
-
clamp
-
equal
public boolean equal(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x equal to y
- See Also:
-
equal
public boolean equal(int x, int y) -
equal
-
equal
-
equal
-
equal
-
equal
-
equal
-
lessThan
public boolean lessThan(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x inferior to y
- See Also:
-
lessThan
public boolean lessThan(int x, int y) -
lessThan
-
lessThan
-
lessThan
-
lessThan
-
lessThan
-
lessThan
-
greaterThan
public boolean greaterThan(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x superior to y
-
greaterThan
public boolean greaterThan(int x, int y) -
greaterThan
-
greaterThan
-
greaterThan
-
greaterThan
-
greaterThan
-
greaterThan
-
greaterThanEqual
public boolean greaterThanEqual(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x superior or equal to y
- See Also:
-
greaterThanEqual
public boolean greaterThanEqual(int x, int y) -
greaterThanEqual
-
greaterThanEqual
-
greaterThanEqual
-
greaterThanEqual
-
greaterThanEqual
-
greaterThanEqual
-
lessThanEqual
public boolean lessThanEqual(float x, float y) - Parameters:
x
- float value to testy
- float value to test- Returns:
- true if x inferior or equal to y
- See Also:
-
lessThanEqual
public boolean lessThanEqual(int x, int y) -
lessThanEqual
-
lessThanEqual
-
lessThanEqual
-
lessThanEqual
-
lessThanEqual
-
lessThanEqual
-
all
- Parameters:
b
- bvec value to test- Returns:
- true only if all components of x are true.
- See Also:
-
all
public boolean all(boolean... list) - Parameters:
list
-- Returns:
- true if all elments of the list is true
-
any
- Parameters:
b
- bvec value to test https://www.khronos.org/registry/OpenGL/specs/gl- Returns:
- true if any component of x is true.
-
any
public boolean any(boolean... list) - Parameters:
list
- boolean list value to test- Returns:
- return true if any element of the list is true
-
only
- Parameters:
b
- bvec value to test- Returns:
- true is only one elements of the list is true
-
only
public boolean only(boolean... list) -
index_pixel_array
public int index_pixel_array(int x, int y, int width) - Parameters:
x
- coordinate xy
- coordinate ywidth
- the width of you 2D array pixel- Returns:
- a linear position from a 2D array tab
-
truncate
public float truncate(float x) -
truncate
public float truncate(float x, int num) - Parameters:
x
- value to worknum
- after coma to display- Returns:
- a float number with a number after comma equal to the num arg
-
hex
-
hex
-
hex
-
hex
- Parameters:
value
- value to convertdigits
- the number of digits (maximum 8)- Returns:
- String hexadecimal value
-
unhex
Converts a Stringrepresentation of a hexadecimal number to its equivalent integer value.- Parameters:
value
- value to convert- Returns:
- unhexadecimal int value
-
binary
-
binary
-
binary
-
binary
Converts an int, byte, char, or color to a String containing the equivalent binary notation. For example, the color value produced by color(0, 102, 153, 255) will convert to the String value "11111111000000000110011010011001". This function can help make your geeky debugging sessions much happier. Note that the maximum number of digits is 32, because an int value can only represent up to 32 bits. Specifying more than 32 digits will have no effect. .- Parameters:
value
- value to convertdigits
- number of digits to return- Returns:
- String binary
-
unbinary
-
split
- Parameters:
value
-delim
-- Returns:
-
split
- Parameters:
value
- is the sentence must be spiteddelim
- is a separator- Returns:
- array String of the String argument sentence
-
file_name
remove the path of your String to return the file name of it.- Parameters:
file_path
-- Returns:
-
print_out
- Parameters:
obj
-
-
print_err
-
print_err_tempo
-
print_tempo
-
get_os
- Returns:
- the current os
-
get_os_family
- Returns:
- the current os family
-
extension
- Parameters:
filename
- check the last part of String path to return the extension if there is one- Returns:
- the extension of the file
-
extension_is
- Parameters:
filename
- check the last part of String path return true at the first extension who matchextension
- list of extension must be check;- Returns:
-