public static function star(Point $center, $n, $radius, $starRadii = [], $ccw = false)
	{
		$points = new Points($center);
		if (!is_array($starRadii)) {
			$starRadii = [$starRadii];
		}
		$radii = array_merge([$radius], $starRadii);
		$count = count($radii);
		$delta = deg2rad(360) / $n / $count;
		$angle = Angle::create(0);
		for ($i = 0; $i < $n; $i++) {
			foreach ($radii as $k => $radius) {
				$points->addPoint($center)->translateY(-$radius)->rotate($center, $angle);
				$angle->add($delta);
			}
		}
		$points->reverseIfCcw($ccw);
		return $points;
	}
public static function star(Point $center, $n, $radius, $starRadii = [], $ccw = false)
	{
		$points = new Points($center);
		if (!is_array($starRadii)) {
			$starRadii = [$starRadii];
		}
		$radii = array_merge([$radius], $starRadii);
		$count = count($radii);
		$delta = deg2rad(360) / $n / $count;
		$angle = Angle::create(0);
		for ($i = 0; $i < $n; $i++) {
			foreach ($radii as $k => $radius) {
				$points->addPoint($center)->translateY(-$radius)->rotate($center, $angle);
				$angle->add($delta);
			}
		}
		$points->reverseIfCcw($ccw);
		return $points;
	}
public static function star ( Point $ center , $ n , $ radius , $ starRadii = [ ] , $ ccw = false ) { $ points = new Points ( $ center ) ; if ( ! is_array ( $ starRadii ) ) { $ starRadii = [ $ starRadii ] ; } $ radii = array_merge ( [ $ radius ] , $ starRadii ) ; $ count = count ( $ radii ) ; $ delta = deg2rad ( 360 ) / $ n / $ count ; $ angle = Angle :: create ( 0 ) ; for ( $ i = 0 ; $ i < $ n ; $ i ++ ) { foreach ( $ radii as $ k => $ radius ) { $ points -> addPoint ( $ center ) -> translateY ( - $ radius ) -> rotate ( $ center , $ angle ) ; $ angle -> add ( $ delta ) ; } } $ points -> reverseIfCcw ( $ ccw ) ; return $ points ; }
Calculates the Points for a regular star polygon.

@param  Point          $center
@param  int            $n          Number of corners of the underlying polygon.
@param  float          $radius
@param  float|float[]  $starRadii
@param  boolean        $ccw        Whether to list the points counterclockwise or not.
Calculates the Points for a regular star polygon .