MCPcopy Create free account

hub / github.com/damoonrashidi/generative-art / functions

Functions159 in github.com/damoonrashidi/generative-art

↓ 12 callersMethodadd_shape
Add a new shape to the group
src/svg/group.rs:114
↓ 11 callersMethodinsert
Insert a new shape into the grid
src/shapes/pointmap.rs:44
↓ 10 callersMethodcontains
(&self, point: &Point)
src/shapes/blob.rs:95
↓ 10 callersMethodx_range
Returns a range that starts at the x position of the rectangle and ends on the right side of the rectangle.
src/shapes/rectangle.rs:90
↓ 9 callersMethodcenter
(&self)
src/shapes/blob.rs:100
↓ 9 callersMethodset_new_image
(&mut self)
src/paintings/forces/ui.rs:24
↓ 9 callersMethodset_new_svg
(&mut self)
src/paintings/wildlands/ui.rs:47
↓ 9 callersMethody_range
Returns a range that starts at teh y position of the rectangle and ends at the bottom of the rectangle.
src/shapes/rectangle.rs:96
↓ 7 callersMethoddistance_to
Calculates the distance between this point and other Example ``` use generative_art::shapes::point::Point; let a = Point(0.0, 0.0);
src/shapes/point.rs:31
↓ 7 callersMethodscale
Scale a circle by a factor of [`scale`]. The radius remains unchanged.
src/shapes/circle.rs:67
↓ 7 callersMethodset_color
Set the fill color of the circle
src/shapes/circle.rs:62
↓ 5 callersMethodget_neighbors
Get all neighboring items that are close to the given shape. An optional distance parameter can be supplied to limit the results to all items to b
src/shapes/pointmap.rs:81
↓ 5 callersMethodsave
Save the SVG document to disk. Optionally a configuration string can be passed, which will be appended as an SVG comment in the file, to be able to re
src/svg/document.rs:73
↓ 4 callersMethodset_new_svg
(&mut self)
src/paintings/piet/ui.rs:42
↓ 3 callersMethodangle_to
The angle between two given points.
src/shapes/point.rs:50
↓ 3 callersMethodbounding_box
(&self)
src/shapes/path.rs:157
↓ 3 callersMethodget_index
Find out what cell a given point is located in.
src/shapes/pointmap.rs:141
↓ 3 callersMethodget_random_color
(&self)
src/palette/simple_palette.rs:36
↓ 3 callersFunctionmap
Map a value from one range to a corresponding value in another range Example ``` use generative_art::transforms::map::map; let value = map(10.0, 0.0
src/transforms/map.rs:15
↓ 3 callersMethodremove
Remove a shape from the grid
src/shapes/pointmap.rs:58
↓ 2 callersMethodarea
Surface area of the rectangle.
src/shapes/rectangle.rs:84
↓ 2 callersMethodas_svg
Get the entire SVG string of the group
src/svg/group.rs:119
↓ 2 callersMethoddistance
Calculates the distance between this blob and another given blob
src/shapes/blob.rs:68
↓ 2 callersFunctionforces
(config: Rc<&ForcesConfig>)
src/paintings/forces/algo.rs:21
↓ 2 callersFunctiongen_weighted
Genarate a value inside a range, weighted towards the beginning of the range Basic example ``` use generative_art::transforms::gen_weighted::gen_weig
src/transforms/gen_weighted.rs:19
↓ 2 callersMethodgenerate
(&self)
src/paintings/grid/ui.rs:37
↓ 2 callersFunctiongenerate_grid
(config: Arc<GridConfig>)
src/paintings/grid/algo.rs:13
↓ 2 callersMethodget_color
(&self, point: &Point)
src/palette/regional_palette.rs:62
↓ 2 callersMethodget_items
Get all items from the grid
src/shapes/pointmap.rs:72
↓ 2 callersMethodget_neighboring_cells
Get all the surrounding cells for a given cell index. This is useful when considering that shapes can spill over the edges of a cell, i.e, if a large
src/shapes/pointmap.rs:154
↓ 2 callersMethodget_random_choice
(&self)
src/transforms/gen_weighted.rs:39
↓ 2 callersMethodget_random_color
(&self)
src/palette/regional_palette.rs:71
↓ 2 callersMethodlength
The total distance between each point in this shape, i.e, the true length of the shape.
src/shapes/path.rs:75
↓ 2 callersMethodoffset
Creates a new point at the given point but with the x position offset by x, and same for y.
src/shapes/point.rs:39
↓ 2 callersFunctionpiet
(config: Rc<&PietConfig>)
src/paintings/piet/algo.rs:16
↓ 2 callersMethodscale
Scale a rectangle by a factor of the scale parameter. The rectangle will scale from the origo, meaning new rectangle that will be returned will be mov
src/shapes/rectangle.rs:69
↓ 2 callersMethodsubdivide
( &self, split_point: &Point, split_direction: SplitDirection, padding: Option
src/shapes/rectangle.rs:116
↓ 2 callersFunctionwildlands
(config: &WildlandsConfig)
src/paintings/wildlands/algo.rs:13
↓ 1 callersMethodadd_group
Add a group to the document. Groups can hold other shapes but share styles between the shapes. Nice to have to keep the final svg file size down if th
src/svg/document.rs:67
↓ 1 callersMethodadd_point
Adds another [`Point`] to the end of this path. This is good if You want to make a line longer.
src/shapes/path.rs:44
↓ 1 callersMethodbetween
Create a new point on the line between the two given points with an offset between [0..1], where 0 is at the first point and 1 is at the last point an
src/shapes/point.rs:56
↓ 1 callersMethodcenter
(&self)
src/shapes/circle.rs:89
↓ 1 callersMethodcenter
(&self)
src/shapes/path.rs:149
↓ 1 callersMethoddistance
Calculate the distance between this circle and another circle. The distance will be calculated based on the edges of the circles, not the center. ```
src/shapes/circle.rs:45
↓ 1 callersMethodeq
A blob is considered equal to another if the shapes are the same size and positioned at the same point. */
src/shapes/blob.rs:38
↓ 1 callersMethodgenerate
(&self)
src/paintings/wildlands/ui.rs:42
↓ 1 callersMethodgenerate
(&self)
src/paintings/piet/ui.rs:37
↓ 1 callersFunctiongenerate_nightfall
(config: Rc<&NightfallConfig>)
src/paintings/nightfall/algo.rs:20
↓ 1 callersFunctionget_dot_count
(rect: &Rectangle, render_height: f64, max_count: usize)
src/paintings/grid/algo.rs:84
↓ 1 callersMethodintersects
True if a given intersects another circle, otherwise false.
src/shapes/circle.rs:52
↓ 1 callersMethodset_new_svg
(&mut self)
src/paintings/grid/ui.rs:43
↓ 1 callersFunctionsplit_line
(line: Vec<Point>, use_gap: bool)
src/paintings/forces/algo.rs:122
↓ 1 callersMethodto_path
Converts this rectangle to a [`Path`]. Useful for path wobbling.
src/shapes/rectangle.rs:101
Methodadd_shape
Add a shape to the SVG document
src/svg/document.rs:61
Methodas_svg
(&self)
src/shapes/circle.rs:77
Methodas_svg
(&self)
src/shapes/blob.rs:74
Methodas_svg
(&self)
src/shapes/point.rs:71
Methodas_svg
(&self)
src/shapes/rectangle.rs:172
Methodas_svg
(&self)
src/shapes/path.rs:102
Methodbounding_box
(&self)
src/shapes/circle.rs:93
Methodbounding_box
(&self)
src/shapes/blob.rs:104
Methodbounding_box
(&self)
src/shapes/point.rs:79
Methodbounding_box
(&self)
src/shapes/rectangle.rs:195
Methodcenter
(&self)
src/shapes/point.rs:75
Methodcenter
(&self)
src/shapes/rectangle.rs:188
Methodcontains
(&self, point: &Point)
src/shapes/circle.rs:102
Methodcontains
(&self, point: &Point)
src/shapes/point.rs:88
Methodcontains
(&self, point: &Point)
src/shapes/rectangle.rs:184
Methodcontains
How this works: it starts by getting the bounding box for the polygon. After which it creates four search rays from the point out in each directio
src/shapes/path.rs:215
Functioncreate_new_regional_palette
()
src/palette/regional_palette.rs:85
Methoddefault
()
src/shapes/circle.rs:126
Methoddefault
()
src/shapes/blob.rs:111
Methoddefault
()
src/shapes/rectangle.rs:206
Methoddefault
()
src/paintings/wildlands/ui.rs:18
Methoddefault
()
src/paintings/grid/ui.rs:20
Methoddefault
()
src/paintings/piet/ui.rs:18
Methoddefault
()
src/paintings/forces/config.rs:14
Methoddefault
()
src/paintings/forces/ui.rs:63
Functiondistance
()
src/shapes/point.rs:98
Functiondoes_intersect
()
src/shapes/path.rs:283
Functiondoes_not_contain
()
src/shapes/rectangle.rs:239
Methodeq
(&self, other: &Self)
src/shapes/circle.rs:108
Methodeq
(&self, other: &Self)
src/shapes/rectangle.rs:217
Functionequality
()
src/shapes/point.rs:113
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/shapes/circle.rs:116
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/shapes/point.rs:65
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/shapes/rectangle.rs:226
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/palette/color.rs:32
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/palette/regional_palette.rs:17
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/paintings/wildlands/ui.rs:12
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/paintings/grid/ui.rs:14
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/paintings/nightfall/config.rs:14
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/paintings/piet/ui.rs:12
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/paintings/forces/config.rs:110
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/paintings/forces/ui.rs:18
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/svg/group.rs:22
Methodfrom
(config: GridConfig)
src/paintings/grid/config.rs:22
Methodfrom
(confiig: NightfallConfig)
src/paintings/nightfall/config.rs:71
Methodfrom
(val: PietConfig)
src/paintings/piet/config.rs:26
Methodfrom_region
(bounds: Rectangle, rounds: u8, palette: Box<dyn Palette>)
src/palette/regional_palette.rs:29
next →1–100 of 159, ranked by callers