3D wire mesh of Conradi's toroid

1 view (last 30 days)
Kieran
Kieran on 11 Nov 2015
Commented: Kieran on 11 Nov 2015
How to draw a 2D image profile of Pim Conradi’s toroid, using the curve fitting toolbox.
  1 Comment
Kieran
Kieran on 11 Nov 2015
% straight_toroid % The image of Pim Conradi’s toroid, which is symmetric about both the x and y axis, % reading coordinates along lines in the 2D image profile, % one for each quadrant combine them and take some points % from the ends of the profile ellipses (before rotation) % to make the profile smoother. Interpolate the points to a quadratic % which then becomes r in the 3D cylindrical polar co-ordinates of the helix. % 2D Pixel Co-ordinates of the inside vortex of Pim Conradi's Toroid
% 0,0 -------> x x,y Origin = 479,261 % | % | % | . % | % \/ y
% Move all points to the right % | . % | . % | . % |------- % | . % | . % | .
% PIXELS % H : Hj : R : A : B % 215 : 186 : 218.75 : 74.5 : 187 H=215 Hj=186 R=218.75 A=74.5 B=187
% ----- Elliptical Points ------
line=[B B+5 B+10 B+15 B+20 B+25 B+30 B+35 B+40 B+45 B+50] z=H*sqrt(1-((line-R)/R).^2) elliptical_points = [B 212.7233;B+5 213.3864;B+10 213.9346;B+15 214.3688;B+20 214.6896;B+25 214.8976;B+30 214.9931;B+35 214.9763;B+40 214.8470;B+45 214.6052;B+50 214.2505] elliptical_points = elliptical_points'
% points_all are the points (mixed together) all moved to the right into one curve % data is in the format r z % data = [69 -14;109 94;80 -5;69 -18;105 89;80 -14;68 -23;102 83;80 -20;68 -30;97 76;80 -24;69 -35;94 70;80 -29;68 -40;92 63;79 -53;68 -50;90 57;78 -59;69 -55;89 50;79 -66;69 -61;86 41;82 -73;70 -65;84 27;86 -80;72 -68;83 27;93 -86;73 -71;81 12;97 -91;74 -74;80 3;102 -96;76 -79;108 -101;77 -81;111 -107;82 -86;149 -131;82 -89;154 -135;85 -94;158 -138;89 -96;162 -141;95 -99;166 -143;98 -101;168 -145;100 -105;172 -147;104 -108;180 -150;136 -130;183 -154;138 -133;187 -156;142 -134;147 -135;150 -137]; % data ignore two lines greater than r = 135 pixels data = [69 -14;109 94;80 -5;69 -18;105 89;80 -14;68 -23;102 83;80 -20;68 -30;97 76;80 -24;69 -35;94 70;80 -29;68 -40;92 63;79 -53;68 -50;90 57;78 -59;69 -55;89 50;79 -66;69 -61;86 41;82 -73;70 -65;84 27;86 -80;72 -68;83 27;93 -86;73 -71;81 12;97 -91;74 -74;80 3;102 -96;76 -79;108 -101;77 -81;111 -107;82 -86;82 -89;85 -94;89 -96;95 -99;98 -101;100 -105;104 -108];
points_data = data' % move all the points up, so there should just be one curve points_upper_right_quadrant = abs(points_data) % duplicate the points and make them in the lower right quadrant points_lower_right_quadrant=[1 0;0 -1]*points_upper_right_quadrant % B B+5 B+10 B+15 B+20;212.7233 213.3864 213.9346 214.3688 214.6896 combine_points = [points_upper_right_quadrant points_lower_right_quadrant elliptical_points]
x = [1 0]*[combine_points] y = [0 1]*[combine_points] plot(x,y,'.') axis equal axis([-2*R 2*R -H H])

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!