Path: Common/General
% Generates fractals. Pass a vertex list, face list, depth of the fractal generation and the standard deviation of the height increment. This routine requires that the face list contain only triangles. The algorithm adds new vertices at each midpoint displaced in the direction of the triangle normal a random amount determined by sigma. Each pass generates 7 triangles for each existing triangle. Type Fractal for a demo. -------------------------------------------------------------------------- ------- Inputs ------- v (:,3) Vertex list f (:,3) Face list n (1,1) Fractal depth sigma (1,1) Standard deviation of height change ------- Outputs ------- v (:,3) Vertex list f (:,3) Face list --------------------------------------------------------------------------
Common: Graphics/NewFig Common: Graphics/XLabelS Common: Graphics/YLabelS Common: Graphics/ZLabelS
Back to the Common Module page