-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New drawing: hexspiral, a hexagonal spiral. A turtle drawing, just fo…
…r a change. Not yet able to scale up for the big plotters, but should be the right size for A3. Would look nice in six colours, but would be much slower with all those pen changes.
- Loading branch information
1 parent
01c567d
commit 1fd2adc
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ flake | |
fraserspiral | ||
hconic2 | ||
hexagon | ||
hexspiral | ||
hilb | ||
hyp | ||
isogrid | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* hexspiral --- plot a hexagonal spiral 2019-05-04 */ | ||
/* Copyright (c) 2019 John Honniball, Froods Software Development */ | ||
|
||
#include <stdio.h> | ||
#include "turtle.h" | ||
|
||
int main(int argc, const char *argv[]) | ||
{ | ||
int i; | ||
|
||
turtle(DEV_HPGL, SIZ_A4, ORI_LAND, FLG_BORD); | ||
|
||
colour(BLACK); | ||
|
||
pen(DOWN); | ||
|
||
for (i = 1; i < 360; i++) { | ||
forward((double)i / 4.0); | ||
turn(59.0); | ||
} | ||
|
||
show(); | ||
|
||
return (0); | ||
} |