Al momento, stai seguendo questa domanda
- Vedrai gli aggiornamenti nel tuofeed del contenuto seguito.
- Potresti ricevere delle e-mail a seconda delle tuepreferenze per le comunicazioni.
generate random size sphere which are randomly located inside a cylinder.
Risposte (2)
21 Commenti

- Each object is locked in place as soon as it is generated. Tentative new positions and sizes are generated for new objects, and if they do not fit there, then that tentative assignment fails and you go on to generate new tentative positions and sizes;
- Each object is locked in place as soon as it is generated. Tentative new positions and sizes are generated for new objects, and if they do not fit there, the program tries to find a different location where an object that size would fit. This tends to get closer to size distribution goals
- Objects are not locked in place. Tentative new positions and sizes are generated throughout the volume for new objects, and if they do not fit there, then the program tries moving existing objects around to make the new one fit, such as by exerting a "force" that tries to move existing objects (and that can push against other objects moving them... but eventually you hit the walls and that pushes back...
- Objects are not locked in place. Tenative new sizes are generated, but the object is "dropped" from the top and allowed to fall, pushing on existing objects, they move, etc., walls get hit, and so on. The advantage of this algorithm is that if there is not enough room to squeeze a new sphere into a lower level, that it just sits on top
- Each object is locked in place as soon as it is generated. Tenative new sizes are generated, but the object is "dropped" from the top and allowed to fall. When it touches something on fewer than 3 contact points beheath it, it can slide or tumble to fill an existing hole, but it never pushes anything out of the way. This algorithm can be easier than continually recalculating how hundreds of existing objects push against each other as room is to be made for a new object
- Objects are not locked in place. A new object is placed on top of an existing object, and then the containing object is "shaken" to see if there is room for it (or other earlier objects) to fall
Vedere anche
Categorie
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Si è verificato un errore
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia-Pacifico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)