Star (4-arm)

Import

import { star4 } from "@sarmal/core/curves/star4";

A 4-pointed star shape built from Fourier harmonics in polar coordinates.

Equation

r=cos(2t)+0.35cos(6t)+0.15cos(10t)x=rcos(t)y=rsin(t)\begin{aligned}r = \left|\cos(2t)\right| + 0.35\left|\cos(6t)\right| + 0.15\left|\cos(10t)\right| &\\x = r\cos(t) &\\y = r\sin(t) &\end{aligned}

Parameters

Family Fourier polar
Period
Default Speed 1
Skeleton static

Key Features

  • 4 sharp tips from base frequency 2t
  • Same harmonic construction as Star but with 4-fold symmetry
  • Fully closed in a single revolution

Usage

Standard

import { createSarmal } from "@sarmal/core";
import { star4 } from "@sarmal/core/curves/star4";

const canvas = document.getElementById("spinner") as HTMLCanvasElement;
const sarmal = createSarmal(canvas, star4);

React

import { Sarmal } from "@sarmal/react";
import { star4 } from "@sarmal/core/curves/star4";

function App() {
  return <Sarmal curve={star4} />;
}