Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge: Translation | Geometric Transformations
Geometric Modelling with Python
Sección 2. Capítulo 2
single

single

Challenge: Translation

Desliza para mostrar el menú

Tarea

Desliza para comenzar a programar

Translate a polygon by a given vector.

Given a polygon represented as a list of (x, y) tuples and a translation vector (dx, dy), create a new list of tuples representing the translated polygon.

  • For each point in polygon, add vector[0] to the x-coordinate and vector[1] to the y-coordinate.
  • Return a new list containing all the translated points.
  • The function must not modify the original polygon list.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 2
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

some-alt