Graphing II

2-dimensional Graphics Primitives

This defines the graphics for a point, but does not show them.

Graphics[Point[{0,2}]]

Graphics[Table[Point[{i,i^2}],{i,-5,5,.05}]]

Graphics[
		Circle[{0,0},4],AspectRatio->Automatic
	]

Graphics[
		Disk[{0,0},4],AspectRatio->Automatic
	]

Graphics[
		Disk[{0,0},4,{π/4,3π/4}],AspectRatio->Automatic
	]

Graphics[
		Line[{{-4,3},{0,0}}]
	]

Graphics[
		Line[Table[{i,i^2},{i,-5,5,3}]]
	]

"Polygon" works the same as "Line", but the first and the last point are connected and the area inside the polygon is shaded.

Graphics[
		Polygon[Table[{i,i^2},{i,-5,5,3}]]
	]

pol[k_]:=Show[Graphics[Polygon[Table[{Cos[2π m/k],Sin[2π m/k]},{m,1,k}]]],AspectRatio->Automatic]

pol[7]

You may combine Graphics Primitives:

Show[Graphics[{Polygon[Table[{Cos[2π m/6],Sin[2π m/6]},{m,1,6}]],Circle[{0,0},1]}],AspectRatio->Automatic]

For Graphics Primitives, "Style Directives" are included in front of the Primitives:

Show[Graphics[
		{
			{Blue,Polygon[Table[{Cos[2π m/6],Sin[2π m/6]},{m,1,6}]]},{Red,AbsoluteThickness[7],Circle[{0,0},1]}
		}],AspectRatio->Automatic]

pic=Graphics[
	{{Red,AbsoluteThickness[7],Circle[{0,0},1]},{Blue,Polygon[Table[{Cos[2π m/6],Sin[2π m/6]},{m,1,6}]]}
		},AspectRatio->Automatic]

The Text Primitive

Graphics[Text["Hello",{0,0}],Axes->True]

pict=Graphics[Text["Hello",{0,0},Background->Yellow],Axes->True]

Show[pic,pict]

Graphics[Text["Hello",{0,0},{-1,-1}],Axes->True]