Ahora está siguiendo esta pregunta
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
generate random size sphere which are randomly located inside a cylinder.
Respuestas (2)
21 comentarios

- 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
Ver también
Categorías
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Se ha producido un error
No se puede completar la acción debido a los cambios realizados en la página. Vuelva a cargar la página para ver el estado actualizado.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- 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-Pacífico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)