3D plot confusion
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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?
0 comentarios
Respuestas (1)
Wick
el 2 de Mayo de 2018
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.
0 comentarios
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!