3D plot confusion

조회 수: 1 (최근 30일)
Minas Emiris
Minas Emiris 2018년 4월 13일
답변: Wick 2018년 5월 2일
I am working on a project of 3D plots, and on objective is to create a UFO spaceship that has a curved shape that resembles a conical shape, but also has couple of equally-spaced square windows on its sides as shown on the uploaded photo. I have managed to create the shape neglecting the windows by first finding the function that the curve of the surface follows on the side view, creating a thin outer layer of the surface with the function 'cylinder' ([x y z] = cylinder(function of side curve), then defining the z values for different layers of the cylindrical shape). The issues I am now facing are:
1. How can I make square holes on the position of the windows?
2. How can I "fill" the interior of the spaceship with a solid surface as it normally is rather than an empty space?

답변 (1개)

Wick
Wick 2018년 5월 2일
Assuming you're making the exterior of the ship from mesh or surface commands. Those commands will connect dots and make patches between vertices in their regular pattern unless it's a NaN. You can make selected values of any of the X, Y, or Z values equal to NaN and the won't be included in the surfaces.
I don't know of any solid plotting options in MATLAB. Everything is surfaces. You're just going to have to add a surface inside the UFO's windows to represent the interior of the UFO.
It might just be easier to define the patches where the windows are as a different color rather than trying to cut them out of the shape.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by