How to create randomly distributed triangles
Mostra commenti meno recenti
I need to create a moving visual display consisting of 500 randomly distributed white triangles (3.4 × 3.4 × 3 cm) on a black background. The frame rate of the visual display needs to be 60 Hz, triangles move in fore-aft direction. Could you please help me figure this out? Thank you.
10 Commenti
Rik
il 26 Ago 2020
What steps did you try yourself?
Also, 60 hertz is quite a lot for live generation. Matlab is not a game engine, so this will require a powerful computer. If you write a file you will have a better chance to reach 60 fps.
Rik
il 2 Set 2020
That is an almost imperceptible speed. Why do you want 60 Hz if your actual movement is 0.2 Hz?
Ron
il 2 Set 2020
Rik
il 2 Set 2020
If you want to create something like that I would still encourage you to produce a video, instead of creating the video in real time. The code in my answer will run at 200fps, but that will quickly drop when you put more graphics object in a figure. I also have a reasonly powerful computer, so you would have to verify the performance of your target computer.
Ron
il 2 Set 2020
Rik
il 2 Set 2020
You can write videos with Matlab. I have never done that before, so I would have to do the same as you: google 'write video Matlab'. You can produce each frame as an image and write it to a video file.
Syncing with an external device might be tricky though. That depends mostly on how that sync should work.
Ron
il 3 Set 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Contour Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!