Gpdiagram examples

These are examples of the input and resulting output of the program gpdiagram.

The text

#dimensions 8 12
#ellipse (4,8)[4,2]
#ellipse (4,0)[4,2]{180,360}
#line (0,0)(0,8) #(8,0)(8,8) #(4,8)(8,8)
#label (6,8)"^r" #(8,4)">h"
produces the image
#dimensions 8 12 #ellipse (4,8)[4,2] #ellipse (4,0)[4,2]{180,360} #line (0,0)(0,8) #(8,0)(8,8) #(4,8)(8,8) #label (6,8)"^r" #(8,4)">h"

The text
%dimensions 6 4
%triangle (0,0) (6,0) (4,3)
%line (4,3) (4,0)
%label (0,0)"_B" 
%(4,3)"^C" %(4,1)">h" %(4,0)"_D"
produces the image
%dimensions 6 4 %triangle (0,0) (6,0) (4,3) %line (4,3) (4,0) %label (0,0)"_<A" %(6,0)"_>B" %(4,3)"^C" %(4,1)">h" %(4,0)"_D"

The text
@arrow (0,3)(2,3) @(4,3)(6,1) @(4,3)(6,5) @(10,1)(12,1) @(10,5)(12,5)
@circle (3,3) 1
@rectangle (6,0)(10,2) @(6,4)(10,6)
@color "blue"
@rectangle (0,-1)(12,7)
produces the image
@arrow (0,3)(2,3) @(4,3)(6,1) @(4,3)(6,5) @(10,1)(12,1) @(10,5)(12,5) @circle (3,3) 1 @rectangle (6,0)(10,2) @(6,4)(10,6) @color "blue" @rectangle (0,-1)(12,7)

The text
&dimensions 6 5
&line (-3,0) (3,0) &(0,-1) (0,4)
&color "red" &line(0,0) (-2,3.4) (-2,0)
&color "blue" &circle (0,0) 1 {0,120}
&label (-2,1.7)"r" &(-1,0)"_x" &(0.5,0.9)">t"
&title "x = r cos(t), y=r sin(t)"
produces the image
&dimensions 6 5 &line (-3,0) (3,0) &(0,-1) (0,4) &color "red" &line(0,0) (-2,3.4) (-2,0) &color "blue" &circle (0,0) 1 {0,120} &label (-2,1.7)"<y" &(-1,1.7)">r" &(-1,0)"_x" &(0.5,0.9)">t" &title "x = r cos(t), y=r sin(t)"

The text
!title "Riemann sums"
!dimensions 12 7
!color "red"
!spline (0,3)(1,5)(3,9)(4,9)(5,7)(7,3)(10,1)
!color "black"
!line (0,0)(10,0)
!rectangle (1,0)(3,5) !(3,0)(5,9) !(5,0)(7,7) !(7,0)(9,3)
!label (1,0)"_1" !(3,0)"_3" !(5,0)"_5" !(7,0)"_7" !(9,0)"_9"
produces the image
!title "Riemann sums" !dimensions 12 7 !color "red" !spline (0,3)(1,5)(3,9)(4,9)(5,7)(7,3)(10,1) !color "black" !line (0,0)(10,0) !rectangle (1,0)(3,5) !(3,0)(5,9) !(5,0)(7,7) !(7,0)(9,3) !label (1,0)"_1" !(3,0)"_3" !(5,0)"_5" !(7,0)"_7" !(9,0)"_9"