Advanced Mathematics and Mechanics Applications Using MATLAB phần 10

Chức năng này tính toán vị trí của một điểm% trên bề mặt của% tích xi lanh tròn tùy ý vị trí trong không gian. % Danh sách các thông số tham số có các hình thức sau đây,% rad có nghĩa là bán kính xi lanh và len% có nghĩa là chiều dài xi lanh. % B = 2 * rad + len;% zdat = [[0,0]; | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 num2str dbest CPU TIME . num2str t SECS rotate3d on shg disp disp Rotate the figure or press disp return to continue dumy input s close end function r cylpoint w1 w2 r0 m rdat zdat r cylpoint w1 w2 v r0 m rdat zdat -------------------------------- This function computes the position of a point on the surface of a circular cylinder arbitrarily positioned in space. The argument list parameters have the following form where rad means cylinder radius and len means cylinder length. b 2 rad len zdat 0 0 rad b 0 rad len b len 1 len rdat zdat rdat 2 2 rad rdat 3 2 rad rdat 4 2 0 u 2 pi sin w1 2 v sin w2 2 z interp1 zdat 1 zdat 2 v rho interp1 rdat 1 rdat 2 v x rho cos u y rho sin u r r0 m x y z function dsqr dcyl2cyl . w r0 m rdat zdat R0 M Rdat Zdat ------------- - dsqr dcyl2cyl w r0 m rdat zdat R0 M Rdat Zdat This function computes the square of the distance between generic points on the surfaces of two circular cylinders in three dimensions. User m functions called cylpoint 2003 by CRC Press LLC 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 global fcount fcount fcount 1 r cylpoint w 1 w 2 r0 m rdat zdat R cylpoint w 3 w 4 R0 M Rdat Zdat dsqr norm r-R 2 function cylfigs cylfigs 7-------- This function plots the geometries pertaining to four data cases used to test closest proximity problems involving two circular cylinders User m functions called plot2cyls w rads p 1 2 q 3 4 s 5 6 t 7 8 rad 1 len 3 r0 4 0 0 v 0 0 1 Rad 1 Len 3 R0 0 4 o V o 0 1 d .4 subplot 2 2 1 x y z X Y Z plot2cyls rad len r0 v Rad Len . R0 V d CASE 1 hold on plot3 w p 1 w p 2 w p 3 linewidth 2 hold off rad 1 len 3 r0 4 0 0 v 3 0 4 Rad 1 Len 3 R0 0 4 o V o 3 4 d .4 subplot 2 2 2 x y z X Y Z .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.