Application Center - Maplesoft

App Preview:

Color Plate: Koch Tetrahedron

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

Image 

Koch Tetrahedron 

© Maplesoft, a division of Waterloo Maple Inc., 2005 

 

> geom3d[tetrahedron](tetra,geom3d[point](o,0,0,0),100):
 

> faces := geom3d[faces](tetra):
 

> DivideFace := proc( face )
local f1, f2, f3, fa, fb, fc, dir, scale, fd, faces;
  f1 := convert(face[1], Vector );
  f2 := convert(face[2], Vector );
  f3 := convert(face[3], Vector );
  fa := (f1 + f2)/2;
  fb := (f2 + f3)/2;
  fc := (f3 + f1)/2;
  dir := LinearAlgebra[CrossProduct](fb-fa,fc-fa);
  dir := dir / LinearAlgebra[Norm](dir,Euclidean);
  scale := LinearAlgebra[Norm](fb-fa,Euclidean)*sin(Pi/3)/3;
  fd := (fa+fb+fc)/3 + dir*scale;
  f1 := convert(f1, list);
  f2 := convert(f2, list);
  f3 := convert(f3, list);
  fa := convert(fa, list);
  fb := convert(fb, list);
  fc := convert(fc, list);
  fd := convert(fd, list);
  faces := Array(1..6);
  faces[1] := [f1, fa, fc];
  faces[2] := [f2, fb, fa];
  faces[3] := [f3, fc, fb];
  faces[4] := [fa, fd, fc];
  faces[5] := [fb, fd, fa];
  faces[6] := [fc, fd, fb];
  return seq(faces[i],i=1..6);
end:
 

> H := seq(evalf(DivideFace(faces[i])),i=1..4):
 

> H := [H]: H := seq(evalf(DivideFace(H[i])),i=1..nops(H)):
 

> H := [H]: H := seq(evalf(DivideFace(H[i])),i=1..nops(H)):
 

> H := [H]: H := seq(evalf(DivideFace(H[i])),i=1..nops(H)):
 

> plots[display](PLOT3D(POLYGONS(H)),shading=XYZ,lightmodel=light4,orientation=[-90,-74]);
 

Plot 

>
 

 

 

 

Legal Notice: The copyright for this application is owned by Maplesoft. The application is intended to demonstrate the use of Maple to solve a particular problem. It has been made available for product evaluation purposes only and may not be used in any other context without the express permission of Maplesoft.  
 

Image