File:Straightedge and compass construction of an hexagon.gif

Summary

Description
English: Straightedge and compass construction of an hexagon
Date
Source https://twitter.com/j_bertolotti/status/1488189847647002628
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 13.0 code

stopstep[t_] := t (2 - t);
sinstep[t_] := Sin[\[Pi]/2 t]^2
handle[pos_] := {Gray, Thick, Disk[pos, 0.05], White, Circle[pos, 0.03]};
frames1 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {t, 0}}], handle[{t, 0}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, -1.2, 1.2, 1/20}];
frames2 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], handle[{1.2 - 1.2*stopstep[t], 0}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames3 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, sinstep[t]}}], handle[{0, 0}], handle[{0, sinstep[t]}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames4 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {Sin[2 \[Pi] sinstep[t]], Cos[2 \[Pi] sinstep[t]]}}], Circle[{0, 0}, 1, {\[Pi]/2, \[Pi]/2 - 2 \[Pi] sinstep[t]}], handle[{0, 0}], handle[{Sin[2 \[Pi] sinstep[t]], Cos[2 \[Pi] sinstep[t]]}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames5 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, 1}}], Circle[{0, 0}, 1], handle[{0, 1 - sinstep[t]}], handle[{0, 0}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames6 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, 1}}], Circle[{0, 0}, 1], handle[{-sinstep[t], 0}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames7 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, 1}}], Circle[{0, 0}, 1], handle[{-1, 0}], handle[{-1 + sinstep[t], 0}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames8 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, 1}}], Circle[{0, 0}, 1], Circle[{-1, 0}, 1, {0, 2 \[Pi] sinstep[t]}], handle[{-1, 0}], handle[{Cos[2 \[Pi] sinstep[t]] - 1, Sin[2 \[Pi] sinstep[t]]}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames9 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, 1}}], Circle[{0, 0}, 1], Circle[{-1, 0}, 1], handle[{0, 0}], handle[{2*sinstep[t] - 1, 0}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames10 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, 1}}], Circle[{0, 0}, 1], Circle[{-1, 0}, 1], Circle[{1, 0}, 1, {\[Pi], \[Pi] - 2 \[Pi] sinstep[t]}], handle[{-Cos[2 \[Pi] sinstep[t]] + 1, Sin[2 \[Pi] sinstep[t]]}], handle[{1, 0}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames11 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, 1}}], Circle[{0, 0}, 1], Circle[{-1, 0}, 1], Circle[{1, 0}, 1], Circle[{1, 0}, 1], handle[{1 + sinstep[t], 0}], handle[{-1.2*sinstep[t], 0}],     Black, Opacity[stopstep[t]], Table[Disk[{Cos[\[Pi]/3 j], Sin[\[Pi]/3 j]}, 0.02], {j, 1, 6, 1}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames12 = Table[
   Graphics[{
     Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, 1}}], Circle[{0, 0}, 1], Circle[{-1, 0}, 1], Circle[{1, 0}, 1], Circle[{1, 0}, 1], Black, Table[Disk[{Cos[\[Pi]/3 j], Sin[\[Pi]/3 j]}, 0.02], {j, 1, 6, 1}], Table[Line[{{Cos[\[Pi]/3 j], Sin[\[Pi]/3 j]}, {Cos[\[Pi]/3 j] + sinstep[t] (Cos[\[Pi]/3 (j + 1)] - Cos[\[Pi]/3 j]), Sin[\[Pi]/3 j] + sinstep[t] (Sin[\[Pi]/3 (j + 1)] - Sin[\[Pi]/3 j])}}], {j,        1, 6, 1}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames13 = Table[
   Graphics[{Black, Thick, Table[Line[{{Cos[\[Pi]/3 j], Sin[\[Pi]/3 j]}, {(Cos[\[Pi]/3 (j + 1)]), (Sin[\[Pi]/3 (j + 1)])}}], {j, 1, 6, 1}], Opacity[1 - sinstep[t]], Gray, Thick, Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, 0}, {0, 1}}], Circle[{0, 0}, 1], Circle[{-1, 0}, 1], Circle[{1, 0}, 1], Circle[{1, 0}, 1], Black, Table[Disk[{Cos[\[Pi]/3 j], Sin[\[Pi]/3 j]}, 0.02], {j, 1, 6, 1}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
frames14 = Table[
   Graphics[{Opacity[1 - sinstep[t]], Black, Thick, Table[ Line[{{Cos[\[Pi]/3 j], Sin[\[Pi]/3 j]}, {(Cos[\[Pi]/3 (j + 1)]), (Sin[\[Pi]/3 (j + 1)])}}], {j, 1, 6, 1}]
     }, PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
   , {t, 0, 1, 1/20}];
ListAnimate[
 Join[
Join[frames1, frames2, frames3, frames4, frames5, frames6, frames7, \
frames8, frames9, frames10, frames11, frames12, frames13, 
 Table[frames13[[-1]], {20}], frames14, Table[frames14[[-1]], {20}]
]

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#Straightedge%20and%20compass%20construction%20of%20an%20hexagon.gifCategory:Self-published work
Category:Animated GIF files Category:Animations of ruler and compass constructions Category:Images with Mathematica source code
Category:Animated GIF files Category:Animations of ruler and compass constructions Category:CC-Zero Category:Images with Mathematica source code Category:Self-published work