Liking cljdoc? Tell your friends :D

sicmutils.calculus.coordinate


coordinate-functionsclj/s

(coordinate-functions coordinate-system)

Returns a structure similar to the manifold/coordinate-prototype of coordinate-system, where every entry is a function from manifold point => the associated component of the point in the coordinate representation described by coordinate-system.

Returns a structure similar to the [[manifold/coordinate-prototype]] of
`coordinate-system`, where every entry is a function from manifold point =>
the associated component of the point in the coordinate representation
described by `coordinate-system`.
sourceraw docstring

define-coordinatesclj/smacro

(define-coordinates coordinate-prototype coordinate-system)

Give some coordinate-system like R2-rect and a coordinate-prototype like [x y] or (up x y),binds the following definitions into the namespace where define-coordinates is invoked:

  • R2-rect binds to a new version of the coordinate system with its coordinate-prototype replaced by the supplied prototype

  • x and y bind to coordinate functions, ie, functions from manifold point to that particular coordinate

  • d:dx and d:dy bind to the corresponding vector field procedures

  • dx and dy bind to 1-forms for each coordinate.

Give some `coordinate-system` like `R2-rect` and a `coordinate-prototype` like
`[x y]` or `(up x y), `binds the following definitions into the namespace
where [[define-coordinates]] is invoked:

- `R2-rect` binds to a new version of the coordinate system with its
  `coordinate-prototype` replaced by the supplied prototype

- `x` and `y` bind to coordinate functions, ie, functions from manifold point
to that particular coordinate

- `d:dx` and `d:dy` bind to the corresponding vector field procedures

- `dx` and `dy` bind to 1-forms for each coordinate.
sourceraw docstring

let-coordinatesclj/smacro

(let-coordinates bindings & body)

similar to a let binding that holds pairs of

<coordinate-structure-prototype>, <coordinate-system>

And internally binds, for each pair: (take [x y] and m/R2-rect as examples):

  • The coordinate system symbol R2-rect to a new version of the coordinate system with its coordinate-prototype replaced by the one you supplied. That's (up x y) in this example.

  • the entries x and y to coordinate functions, ie, functions from manifold point to this particular coordinate

  • d:dx and d:dy vector field procedures (I'm fuzzy here!)

  • dx and dy 1-forms for each coordinate (fuzzy here too!)

Example:

(let-coordinates [[x y]    R2-rect
                 [r theta] R2-polar]
  ;; bindings:
  ;; R2-rect, x, y, d:dx, d:dy, dx, dy
  ;; R2-polar, r, theta, d:dr, d:dtheta, dr, dtheta
  body...)
similar to a `let` binding that holds pairs of

<coordinate-structure-prototype>, <coordinate-system>

And internally binds, for each pair: (take `[x y]` and `m/R2-rect` as
examples):

- The coordinate system symbol `R2-rect` to a new version of the coordinate
  system with its `coordinate-prototype` replaced by the one you supplied.
  That's `(up x y)` in this example.

- the entries `x` and `y` to coordinate functions, ie, functions from manifold
  point to this particular coordinate

- `d:dx` and `d:dy` vector field procedures (I'm fuzzy here!)

- `dx` and `dy` 1-forms for each coordinate (fuzzy here too!)

Example:

```clojure
(let-coordinates [[x y]    R2-rect
                 [r theta] R2-polar]
  ;; bindings:
  ;; R2-rect, x, y, d:dx, d:dy, dx, dy
  ;; R2-polar, r, theta, d:dr, d:dtheta, dr, dtheta
  body...)
```
sourceraw docstring

quotify-coordinate-prototypeclj/s

(quotify-coordinate-prototype p)

Scmutils wants to allow forms like this:

(using-coordinates (up x y) R2-rect ...)

Note that x, y are unquoted. This function converts such an unquoted form into a quoted one that could be evaluated to return an up-tuple of the symbols:

(up 'x 'y)

Such an object is useful for [[structure/mapr]].

Scmutils wants to allow forms like this:

```clojure
(using-coordinates (up x y) R2-rect ...)
```

 Note that `x`, `y` are unquoted. This function converts such an unquoted form
into a quoted one that could be evaluated to return an up-tuple of the
symbols:

```clojure
(up 'x 'y)
```

Such an object is useful for [[structure/mapr]].
sourceraw docstring

using-coordinatesclj/smacro

(using-coordinates coordinate-prototype coordinate-system & body)

using-coordinates wraps let-coordinates and allows you to supply a single coordinate prototype and a single coordinate system. See let-coordinates for details about what symbols are bound inside the body.

Example:

(using-coordinates (up x y) R2-rect
                   body...)
[[using-coordinates]] wraps [[let-coordinates]] and allows you to supply a
single coordinate prototype and a single coordinate system.
See [[let-coordinates]] for details about what symbols are bound inside the
body.

Example:

```clojure
(using-coordinates (up x y) R2-rect
                   body...)
```
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close