﻿ ellipsoid – Algosim documentation
Algosim documentation: ellipsoid

# ellipsoid

Creates a new ellipsoid.

## Syntax

• `ellipsoid([a[, f[, d[, α]]]])`

• `a` is a three-dimensional real vector

• `f` is a three-dimensional real vector

• `d` is a three-dimensional real vector

• `α` is a real number

## Description

`ellipsoid()` creates the ellipsoid `(x/1)² + (y/2)² + (z/3)² = 1`.

`ellipsoid(a, f, d, α)` creates the ellipsoid obtained from the unit sphere by translating it by `a`, scaling it by `diag(f)`, aligning it with `d`, and rotating it an amount `α` about its axis.

Hence,

• `a` specifies the position of the ellipsoid’s centre.

• `f = (s, t, u)` specifies the half-axis lengths `s`, `t`, and `u` of the ellipsoid.

• `d` specifies the axis of the ellipsoid corresponding to the half axis with length `u`.

• `α` specifies the rotation of the ellipsoid about this axis.

If omitted, `a` defaults to `❨0, 0, 0❩`, `f` to `❨1, 2, 3❩`, `d` to `❨0, 0, 1❩`, and `α` to `0`.

The object is shown in the current scene and a reference to the object is returned.

The `AdjustVisual` function can be used to adjust the appearance of the ellipsoid. See Visual settings for a list of applicable settings.

## Examples

`ellipsoid()`

`ellipsoid(❨5, 5, 0❩, ❨2, 2, 8❩)`

`ellipsoid(❨5, 5, 0❩, ❨2, 2, 8❩, ❨1, 2, 0❩)`