Skip to content

Commit

Permalink
Change draw_semicircle to draw_arc
Browse files Browse the repository at this point in the history
  • Loading branch information
PointlessUser committed Aug 15, 2024
1 parent 3e6dda3 commit 6ebd746
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 60 deletions.
72 changes: 36 additions & 36 deletions PLOTDRAW_README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Plot Draw v0.2.0
# Plot Draw v0.2.1

This library is designed to provide a set of functions for drawing various types of plots, arrows, segments, and shapes using Matplotlib. These functions allow for customized plotting and annotation of graphical elements.

## General

### blank_canvas

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L7C1-L49C14)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L7C1-L49C14)

```python
blank_canvas(
Expand Down Expand Up @@ -48,14 +48,14 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![white canvas](./images/blank_canvas.png)

</div>

## lines and arrows

### draw_line

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L52C1-L110C1)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L52C1-L110C1)

```python
draw_line(
Expand Down Expand Up @@ -95,12 +95,12 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![segment](./images/draw_line.png)

</div>

### draw_arrow

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L112C1-L190C1)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L112C1-L190C1)

```python
draw_arrow(
Expand Down Expand Up @@ -154,12 +154,12 @@ def main(inputs):
#### Output:

<div style={{textAlign: 'center'}}>
![Arrow](./images/draw_arrow.png)

</div>

### draw_double_arrowhead

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L192C1-L269C6)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L192C1-L269C6)

```python
draw_double_arrowhead(
Expand Down Expand Up @@ -199,12 +199,12 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![double arrowhead](./images/draw_double_arrowhead.png)

</div>

### vertical_arrow_rain

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L272C1-L348C10)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L272C1-L348C10)

```python
vertical_arrow_rain(
Expand Down Expand Up @@ -250,12 +250,12 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![vertical arrow rain](./images/vertical_arrow_rain.png)

</div>

### horizontal_arrow_rain

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L351C1-L427C1)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L351C1-L427C1)

```python
horizontal_arrow_rain(
Expand Down Expand Up @@ -301,14 +301,14 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![horizontal arrow rain](./images/horizontal_arrow_rain.png)

</div>

## Shapes

### draw_circle

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L429C1-L468C58)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L429C1-L468C58)

```python
draw_circle(
Expand Down Expand Up @@ -348,15 +348,15 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![arrow](./images/draw_circle.png)

</div>

### draw_semicircle
### draw_arc

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L471C1-L557C10)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L471C1-L557C10)

```python
draw_semicircle(
draw_arc(
radius,
start_angle,
end_angle,
Expand Down Expand Up @@ -397,18 +397,18 @@ import mecsimcalc as msc
import mecsimcalc.plot_draw as plot_draw

def main(inputs):
plot_draw.draw_semicircle(5, 0, 90, degrees=True)
plot_draw.draw_arc(5, 0, 90, degrees=True)
plot = msc.print_plot(plt)
return {'plot': plot}.
```

<div style={{textAlign: 'center'}}>
![quarter circle arc](./images/draw_semicircle.png)

</div>

### draw_rounded_rectangle

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L560C1-L643C25)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L560C1-L643C25)

```python
draw_rounded_rectangle(
Expand Down Expand Up @@ -450,14 +450,14 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![rounded rectangle](./images/draw_rounded_rectangle.png)

</div>

## Axes

### draw_two_axes

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L646C1-L755C14)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L646C1-L755C14)

```python
draw_two_axes(
Expand Down Expand Up @@ -505,12 +505,12 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![two axes](./images/draw_two_axes.png)

</div>

### draw_two_inclined_axes

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L758C1-L873C14)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L758C1-L873C14)

```python
draw_two_inclined_axes(
Expand Down Expand Up @@ -558,12 +558,12 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![2 inclined axes](./images/draw_two_inclined_axes.png)

</div>

### draw_three_axes

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L876C1-L1005C1)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L876C1-L1005C1)

```python
draw_three_axes(
Expand Down Expand Up @@ -605,12 +605,12 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![three axes](./images/draw_three_axes.png)

</div>

### draw_three_axes_rotated

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L1007C1-L1145C14)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L1007C1-L1145C14)

```python
draw_three_axes_rotated(
Expand Down Expand Up @@ -657,14 +657,14 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![three axes rotated](./images/draw_three_axes_rotated.png)

</div>

## Calculations

### calculate_midpoint

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L1148C1-L1180C40)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L1148C1-L1180C40)

```python
calculate_midpoint(
Expand Down Expand Up @@ -705,7 +705,7 @@ def main(inputs):

### calculate_intersection_point

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L1183C1-L1248C1)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L1183C1-L1248C1)

```python
calculate_intersection_point(
Expand Down Expand Up @@ -751,7 +751,7 @@ def main(inputs):

### calculate_arrow_endpoint

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L1249C1-L1291C1)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L1249C1-L1291C1)

```python
calculate_arrow_endpoint(
Expand Down Expand Up @@ -795,7 +795,7 @@ def main(inputs):

### calculate_angle

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L1293C1-L1333C1)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L1293C1-L1333C1)

```python
calculate_angle(
Expand Down Expand Up @@ -837,7 +837,7 @@ def main(inputs):

### get_arc_points

[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.0/mecsimcalc/plot_draw.py#L1335C1-L1387C16)
[**[Source]**](https://github.com/MecSimCalc/MecSimCalc-utils/blob/v0.2.1/mecsimcalc/plot_draw.py#L1335C1-L1387C16)

```python
get_arc_points(
Expand Down Expand Up @@ -883,5 +883,5 @@ def main(inputs):
```

<div style={{textAlign: 'center'}}>
![arc points](./images/get_arc_points.png)

</div>
2 changes: 1 addition & 1 deletion PyTests/test_plot_draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def run_all_functions():
assert calculate_midpoint((0, 0), (1, 1)) == (0.5, 0.5)

# Draw an arc of a circumference
draw_semicircle(radius=0.5, start_angle=0, end_angle=np.pi / 2)
draw_arc(radius=0.5, start_angle=0, end_angle=np.pi / 2)

blank_canvas()

Expand Down
Loading

0 comments on commit 6ebd746

Please sign in to comment.