Skip to content

Commit

Permalink
Nuke numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
maybeetree committed Sep 3, 2024
1 parent eed17f7 commit 5eb422a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
19 changes: 10 additions & 9 deletions doc/pages/builtin-compos.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ designs:

```python exec
import raimad as rai
import numpy as np

from math import radians

RectLW = rai.RectLW(100, 50)

circle = rai.Circle(radius=40)

ansec = rai.AnSec(
theta1=np.deg2rad(45),
theta2=np.deg2rad(180),
theta1=radians(45),
theta2=radians(180),
r1=50,
r2=80,
)
Expand Down Expand Up @@ -50,8 +51,8 @@ There are many different ways to define an `AnSec`:
# angle one, and angle two

ansec = rai.AnSec.from_auto(
theta1=np.deg2rad(45),
theta2=np.deg2rad(180),
theta1=radians(45),
theta2=radians(180),
r1=50,
r2=80,
)
Expand All @@ -62,8 +63,8 @@ show(ansec)
# Make it go the other way

ansec = rai.AnSec.from_auto(
theta1=np.deg2rad(45),
theta2=np.deg2rad(180),
theta1=radians(45),
theta2=radians(180),
r1=50,
r2=80,
)
Expand All @@ -76,8 +77,8 @@ show(ansec)

for x in (10, 40, 60):
ansec = rai.AnSec.from_auto(
theta1=np.deg2rad(0),
dtheta=np.deg2rad(x * 3),
theta1=radians(0),
dtheta=radians(x * 3),
r1=50,
dr=x,
)
Expand Down
3 changes: 1 addition & 2 deletions doc/pages/coords-transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ You can move, rotate, and scale any RAIMAD compo:

```python exec
import raimad as rai
import numpy as np

class IShapedFilter(rai.Compo):
def _make(self, beam_length: float = 10.5):
Expand All @@ -42,7 +41,7 @@ class TransformExample(rai.Compo):

moved = filter.copy().move(50, 20)
scaled = filter.copy().scale(5)
rotated = filter.copy().rotate(np.deg2rad(90)).scale(4)
rotated = filter.copy().rotate(rai.quartercircle).scale(4)

self.subcompos.filter = filter
self.subcompos.moved = moved
Expand Down
10 changes: 5 additions & 5 deletions doc/pages/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ but you can also use them for your own benefit.

```python exec
import raimad as rai
import numpy as np
from math import degrees

print( rai.midpoint( np.array((-10, -10)), np.array((12, 12)) ))
print( rai.polar( np.deg2rad(90), 5 ))
print( np.rad2deg(
rai.angle_between( np.array((0, 10)), np.array((2, 2)) )
print( rai.midpoint( (-10, -10), (12, 12) ))
print( rai.polar( rai.halfcircle, 5 ))
print( degrees(
rai.angle_between( (0, 10), (2, 2) )
))

```
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "raidoc"
version = "1.1.0.0"
version = "1.1.0.1"
description = "Documentation for RAIMAD"
authors = [
{name = "maybetree", email = "[email protected]"}
Expand Down

0 comments on commit 5eb422a

Please sign in to comment.