Macros for ImageJ 1.5h17 Java 1.8 to draw stars.

The original reason for writing this macro was to compare a Star of David made with two overlapping equilateral triangles with a six pointed yellow star seen on the shirt of a person in a movie with slightly more acute points on the star (scroll down to bottom for more...).

The first version draw rasters stars_6_points_drawline_fill_method.ijm and the second version switched to drawing a polygon 06_points_polygon_drawing_method.ijm.

 

Macro to iterate through three to 13 pointed stars. stars_polygon_method_stack.ijm

 

3 points and up stars_polygon_ method_single_stack.ijm

A note about the if statement to alternate outside vertex and interior vertex:
This line of code
  if ((vertex % 2) == 0)	
may be replaced with	
  if (vertex % 2)
as 0 and 1 are interpreted as false and true.		

 

And just for a little fun. stars_random.ijm

 

The question about the stars arose when I saw this movie and wondered if the star was supposed to be made of two overlapping triangles or not.


Jimmy Cliff in the movie "The Harder They Come" 1972. Left panel is the star extracted with straight lines superimposed on it.