Home » Posts tagged 'Surface'

# Tag Archives: Surface

## Henneberg surface, Matlab code

close all; clc;clear all;

[u v] = meshgrid(0:0.1:1); %v = meshgrid(1:0.01:2); i = 1; for u =-pi/2: 0.1:pi/2 j =1; for v = -pi/2:0.1:pi/2 x(i,j) = 2*sinh(u)*cos(v) - 2/3*sinh(3*u)*cos(3*v); y(i,j) = 2*sinh(u)*sin(v) - 2/3*sinh(3*u)*sin(3*v); z(i,j) = 2*cosh(2*u)* cos(2*v); j = j+1; end i = i+1; end surf(y,x,z); axis off;