Documentation ¶
Overview ¶
Surface computes an SVG rendering of a 3-D surface function.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Corner ¶
Example ¶
fmt.Printf("<svg xmlns='http://www.w3.org/2000/svg' "+ "style='stroke: grey; fill: white; stroke-width: 0.7' "+ "width='%d' height='%d'>", width, height) for i := 0; i < cells; i++ { for j := 0; j < cells; j++ { ax, ay := Corner(i+1, j) bx, by := Corner(i, j) cx, cy := Corner(i, j+1) dx, dy := Corner(i+1, j+1) fmt.Printf("<polygon points='%g,%g %g,%g %g,%g %g,%g'/>\n", ax, ay, bx, by, cx, cy, dx, dy) } } fmt.Println("</svg>")
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.