Traslación de obejtos - Forum

Forum Navigation
You need to log in to create posts and topics.

Traslación de obejtos

Hola @luishp

Estoy intentando hacer una traslación de objetos (no rotación) respecto a una coordenada central. ¿Es posible hacerlo?

¿Hay algún método en visualneo? Creo que en javascript es posible.

Con el metodo transform se puede hacer una rotación:

BeginJS
document.getElementById("Rectangle1").style.transform = "rotate(7deg)";
EndJS

Pero ¿una traslación? Por ejemplo para hacer que varios objetos se dispongan en  círculo respecto a otro que está en el centro.

Saludos,

@rrey

For example to make several objects arranged in a circle with respect to another that is in the center.

I don't know if there is CSS for something like this ... but it would be possible do this via scripting ... a generic subroutine could be passed ...

- the name of the object at the center of this imaginary circle
- the radius of this same circle
- the starting angle (e.g. 0 degrees would be north)
- the list (names) of objects to be located on the circumference (starting at 0 degrees and moving clockwise)

Assuming that the centers of the objects on the circumference would be placed at an equal angle (360 degrees divided by number of objects), consideration would have to be given to situations where objects would end up overlapping adjacent ones.

Gracias @Gaev  estudiaré el tema.

@rrey, si es posible hacer translaciones mediante transform. Echa un vistazo aquí:
https://www.w3schools.com/css/css3_2dtransforms.asp