Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Translation | Geometric Transformations
Geometric Modelling with Python
Sectie 2. Hoofdstuk 2
single

single

Challenge: Translation

Veeg om het menu te tonen

Taak

Veeg om te beginnen met coderen

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.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 2
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

some-alt