How to create a solid structure

Hi everybody, I have some problems with the writing of a Matlab script able to create the following solid structure:
This structure should be a single sector of a football stadium, on the tilted surface I will distribute a regular disposition of seats. Thanks to all for the help! Have a god day!

2 Comments

Are you using a specific toolbox?

Sign in to comment.

 Accepted Answer

Star Strider
Star Strider on 29 Mar 2014
Edited: Star Strider on 29 Mar 2014
Does this do what you want?
x = linspace(1,50,50);
y = linspace(1,100);
[X Y] = meshgrid(x,y);
Z = X.*tand(30);
figure(1)
mesh(X, Y, Z)
EDIT:
To see what the stadium would look like as steps rather than as a continuous surface, plot figure(2):
figure(2)
bar3(Z)
axis equal

4 Comments

Great, thank you! I've another question: is it possible treat the tilted surface like a matrix of 100 rows (1 row for each meter) and the resulting number of column from the Pitagora's theorem application with 28,8 m and 50 m? As i wrote before I would model the surface tilted as a stadium sector with its seats and for each seats I will write a function in order to have the three coordinates (xyz) of each seat! Thank you!
If every seat gets about 1m², every seat is addressable. This sample of the matrices will give you an idea of how to address them:
Xs = X(1:5, 1:5)
Ys = Y(1:5, 1:5)
Zs = Z(1:5, 1:5)
The Z values are the seat elevations corresponding to coordinates given by X and Y. I believe you do not have to calculate anything — it’s all in the data already calculated.
I changed the code a bit to be sure every seat was allocated about 1m² and that those in the front row were seated at a height of about 0.58m. (I originally had them sitting on the ground.)
Ok, I guess to have a figure that could explain the scenario that I would model: the first figure represents the stadium
is it possible reconstruct this plot? The 2nd figure is the red area that is the single stadium sector, the tilted surface, with more precise division among the seats:
For this second image I would generate the two vectors x and y with linspace command and the z coordinates withe X.*tand(30). The x vector will have a separation of 1 (1m) while the y vector will have a separation of 0.5 (0.5m). Does it right?
In that situation, your y vector (that eventually creates the Y matrix) would be:
y = linspace(0,100,200);
I used (0,100,200) here. You may have to experiment with variations such as (1,100,200) until you get the result you want, since I don’t know how you want to specify or calculate them. Having 200 elements in 100 meters puts them about a half meter apart.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!