Small Satellites

Home » Math » Henneberg surface, Matlab code

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;

Hennebergsurface

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Recent Post

%d bloggers like this: