File:Turtles11.gif

Summary

Description
English: Turtle geometry with gnuplot and c language. Mathc home edition (wikiversité fr)
/* ------------------------------------ */
/* save as : c03.c                      */
/* ------------------------------------ */
#include "v_a.h"
#include "y_o.h"
/* ------------------------------------ */
void shape(
double **U,
double step,
int    side
)
{
double angle=360./side;

   for(;side--;)
      {GO(U,step);TU(U,angle);}
}
/* ------------------------------------ */
int main(void)
{
double **U = GINIT(-10.,10.,-10.,10.);

   SETUP(U,30,-5,5);
   shape(U,2,3);
      GO(U,3.);

   SETUP(U, 0, 5,5);
   shape(U,2,4);
      GO(U,3.);

   SETUP(U,72.-90.,-5,-5);
   shape(U,2,5);
      GO(U,3.);

   SETUP(U,10-90, 5,-5);
   shape(U,.2,36);
      GO(U,3.);

   F_mR(U);

  printf("  * open the file a_main.plt with Gnuplot.\n\n\n");
  fflush(stdout);

  return 0;
}
Date
Source Own work
Author Xhungab

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Turtles11.gif
Category:Self-published work Category:Gnuplot graphics Category:Images with C source code
Category:CC-Zero Category:Gnuplot graphics Category:Images with C source code Category:Self-published work