Star
Import
import { star } from "@sarmal/core/curves/star"; A 5-pointed star shape built from Fourier harmonics in polar coordinates.
Equation
Parameters
| Family | Fourier polar |
| Period | 2π |
| Default Speed | 1 |
| Skeleton | static |
Key Features
- 5 sharp tips from the fundamental frequency
- Two higher harmonics sharpen the tips and add subtle texture
- Fully closed in a single revolution
Usage
Standard
import { createSarmal } from "@sarmal/core";
import { star } from "@sarmal/core/curves/star";
const canvas = document.getElementById("spinner") as HTMLCanvasElement;
const sarmal = createSarmal(canvas, star); React
import { Sarmal } from "@sarmal/react";
import { star } from "@sarmal/core/curves/star";
function App() {
return <Sarmal curve={star} />;
}