Skip to content

Commit

Permalink
added srnd: small PRNG with local state. pth: for nd path lerp
Browse files Browse the repository at this point in the history
small bugfix in jpath. small features in utils (now)
  • Loading branch information
inconvergent committed Jul 18, 2023
1 parent a24f90d commit c50a305
Show file tree
Hide file tree
Showing 22 changed files with 870 additions and 482 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN sbcl --noinform --load /opt/quicklisp.lisp\
--eval '(sb-ext:quit)'

RUN mkdir -p quicklisp
# &&\
# ln -s /opt/quicklisp/setup.lisp quicklisp/setup.lisp
RUN echo '(load "/opt/quicklisp/setup.lisp")' > /root/.sbclrc

RUN mkdir -p /opt/data
RUN apt-get -qq remove curl -y &&\
apt-get -qq autoremove -y &&\
Expand Down
9 changes: 5 additions & 4 deletions auxin.asd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@


(asdf:defsystem #:auxin
:description "Auxiliary Utilities for Generative Art"
:version "0.1.1"
:version "0.1.3"
:author "anders hoff/inconvergent"
:licence "MIT"
:in-order-to ((asdf:test-op (asdf:test-op #:auxin/tests)))
Expand All @@ -19,16 +18,19 @@
(:file "state" :depends-on ("utils"))
(:file "hset" :depends-on ("utils"))
(:file "math" :depends-on ("utils"))
(:file "rnd/srnd" :depends-on ("utils"))
(:file "rnd/macros" :depends-on ("utils"))
(:file "rnd/rnd" :depends-on ("rnd/macros"))
(:file "rnd/2rnd" :depends-on ("rnd/rnd"))
(:file "rnd/3rnd" :depends-on ("rnd/rnd"))
(:file "rnd/walkers" :depends-on ("rnd/2rnd" "rnd/3rnd"))
(:file "fn" :depends-on ("rnd/rnd"))
(:file "gridfont/main" :depends-on ("utils"))
(:file "draw/path" :depends-on ("rnd/rnd"))
(:file "draw/bzspl" :depends-on ("rnd/rnd"))
(:file "draw/pigment" :depends-on ("utils"))
(:file "draw/ortho" :depends-on ("utils"))
; TODO: unify simplify-path and path?
(:file "draw/simplify-path" :depends-on ("utils"))
(:file "draw/jpath" :depends-on ("utils"))
(:file "draw/svg" :depends-on ("draw/simplify-path" "draw/jpath"))
Expand All @@ -38,10 +40,9 @@
(:file "graph/mst-cycle" :depends-on ("graph/main"))
(:file "draw/canvas" :depends-on ("utils"))))


(asdf:defsystem #:auxin/tests
:depends-on (#:auxin #:prove #:asdf #:uiop)
:version "0.1.1"
:version "0.1.3"
:perform (asdf:test-op (o s) (uiop:symbol-call ':auxin-tests '#:run-tests))
:pathname "test/"
:serial t
Expand Down
29 changes: 27 additions & 2 deletions docs/AUXIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,19 @@
; [symbol]
;
; *OPT* names a special variable:
; Declared type: CONS
; Value: (OPTIMIZE (SAFETY 1) (SPEED 3) DEBUG SPACE)
; Value: (OPTIMIZE (SAFETY 1) (SPEED 3) (DEBUG 1) (SPACE 2))
```

#### AUXIN:\*SRNDOPT\*

```
:missing:todo:
; AUXIN:*SRNDOPT*
; [symbol]
;
; *SRNDOPT* names a special variable:
; Value: (OPTIMIZE SPEED (SAFETY 0) (DEBUG 1))
```

#### AUXIN:ABBREV
Expand Down Expand Up @@ -280,6 +291,20 @@
; [symbol]
```

#### AUXIN:KV

```
:missing:todo:
; AUXIN:KV
; [symbol]
;
; KV names a compiled function:
; Lambda-list: (&REST ARGS)
; Derived type: (FUNCTION * (VALUES SYMBOL &OPTIONAL))
; Source file: /data/x/auxin/src/utils.lisp
```

#### AUXIN:LAST\*

```
Expand Down
2 changes: 1 addition & 1 deletion docs/JPATH.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
; Derived type: (FUNCTION
; ((SIMPLE-ARRAY SINGLE-FLOAT) SINGLE-FLOAT &KEY
; (:REP FIXNUM) (:CLOSED BOOLEAN) (:LIMITS T))
; *)
; (VALUES T &OPTIONAL))
; Source file: /data/x/auxin/src/draw/jpath.lisp
```

Expand Down
188 changes: 188 additions & 0 deletions docs/PTH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
#### PTH:@CLOSED

```
:missing:todo:
; PTH:@CLOSED
; [symbol]
;
; @CLOSED names a compiled function:
; Lambda-list: (PTH)
; Derived type: (FUNCTION (PTH:PTH) (VALUES BOOLEAN &OPTIONAL))
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:@DIM

```
:missing:todo:
; PTH:@DIM
; [symbol]
;
; @DIM names a compiled function:
; Lambda-list: (PTH)
; Derived type: (FUNCTION (PTH:PTH)
; (VALUES (UNSIGNED-BYTE 31) &OPTIONAL))
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:@LEN

```
; PTH:@LEN
; [symbol]
;
; @LEN names a compiled function:
; Lambda-list: (PTH)
; Derived type: (FUNCTION (PTH:PTH) (VALUES SINGLE-FLOAT &OPTIONAL))
; Documentation:
; the total length of pth
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:@N

```
:missing:todo:
; PTH:@N
; [symbol]
;
; @N names a compiled function:
; Lambda-list: (PTH)
; Derived type: (FUNCTION (PTH:PTH)
; (VALUES (UNSIGNED-BYTE 31) &OPTIONAL))
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:@NS

```
:missing:todo:
; PTH:@NS
; [symbol]
;
; @NS names a compiled function:
; Lambda-list: (PTH)
; Derived type: (FUNCTION (PTH:PTH)
; (VALUES (UNSIGNED-BYTE 31) &OPTIONAL))
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:@PTS

```
; PTH:@PTS
; [symbol]
;
; @PTS names a compiled function:
; Lambda-list: (PTH &OPTIONAL CLOSED)
; Derived type: (FUNCTION (PTH:PTH &OPTIONAL BOOLEAN) *)
; Documentation:
; returns all points in pth
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:LPOS

```
; PTH:LPOS
; [symbol]
;
; LPOS names a compiled function:
; Lambda-list: (PTH A B)
; Derived type: (FUNCTION (PTH:PTH SINGLE-FLOAT SINGLE-FLOAT) *)
; Documentation:
; get all points [(pos a) ... (pos b)].
; if pth is closed and b < a it will move through (pos 0)
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:MAKE

```
; PTH:MAKE
; [symbol]
;
; MAKE names a compiled function:
; Lambda-list: (PTS &KEY (DIM 2) CLOSED)
; Derived type: (FUNCTION
; ((SIMPLE-ARRAY SINGLE-FLOAT) &KEY
; (:DIM (UNSIGNED-BYTE 31)) (:CLOSED BOOLEAN))
; (VALUES PTH:PTH &OPTIONAL))
; Documentation:
; initiate a pth from pts
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:POS

```
; PTH:POS
; [symbol]
;
; POS names a compiled function:
; Lambda-list: (PTH &OPTIONAL (A 0.0))
; Derived type: (FUNCTION (PTH:PTH &OPTIONAL SINGLE-FLOAT)
; (VALUES (SIMPLE-ARRAY SINGLE-FLOAT) (UNSIGNED-BYTE 31)
; SINGLE-FLOAT &OPTIONAL))
; Documentation:
; get the coordinate of the linear interpolation along pth where 0.0 <= a <= 1.0.
; if pth is closed (pos a) equals (pos b).
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:PRT

```
:missing:todo:
; PTH:PRT
; [symbol]
;
; PRT names a compiled function:
; Lambda-list: (PTH &OPTIONAL (N (PTH-N PTH)))
; Derived type: (FUNCTION (PTH:PTH &OPTIONAL T)
; (VALUES PTH:PTH &OPTIONAL))
; Source file: /data/x/auxin/src/draw/path.lisp
```

#### PTH:PTH

```
:missing:todo:
; PTH:PTH
; [symbol]
;
; PTH names the structure-class #<STRUCTURE-CLASS PTH:PTH>:
; Class precedence-list: PTH:PTH, STRUCTURE-OBJECT, SB-PCL::SLOT-OBJECT,
; T
; Direct superclasses: STRUCTURE-OBJECT
; No subclasses.
; Slots:
; PTH::N
; Type: VEQ:PN
; Initform: 2
; PTH::NS
; Type: VEQ:PN
; Initform: 1
; PTH::DIM
; Type: VEQ:PN
; Initform: 2
; PTH::CLOSED
; Type: BOOLEAN
; Initform: NIL
; PTH::VPTS
; Type: VEQ:FVEC
; Initform: NIL
; PTH::WS
; Type: VEQ:FVEC
; Initform: NIL
; PTH::LEN
; Type: VEQ:FF (unboxed)
; Initform: 0.0
```

Loading

0 comments on commit c50a305

Please sign in to comment.