I have a dataset where one column consists of tuples with the offset of X and Y coordinates of the from the center of a cirlce, which represents the perimeter. Then there are two more columns, one with the X coordinate of the center of the cirlce, and one with the Y coordinate of the center of the circle.
The dataframe looks like this:
| X coordinate | Y coordinate | Offset |
|---|---|---|
| 400 | 450 | ((4, 1),(2, 1),(1, 1),(1, 2),(1, 3),(-4, 4)) |
| 500 | 550 | ((7, 1),(4, 2),(3, 0),(-2, 1),(-4, 1),(0, 3)) |
| 450 | 250 | ((4, 1),(2, 1),(1, 1),(1, 2),(1, 3),(-4, 4)) |
| 525 | 800 | ((7, 1),(4, 2),(3, 0),(-2, 1),(-4, 1),(0, 3)) |
| 475 | 360 | ((4, 1),(2, 1),(1, 1),(1, 2),(1, 3),(-4, 4)) |
| 510 | 550 | ((7, 1),(4, 2),(3, 0),(-2, 1),(-4, 1),(0, 3)) |
The first values in the tuples represent the offset on the X coordinate and the second on the Y coordinate. Like this (( X offset, Y offset), (X offset, Y offset))
My goal is to get a column where the tuples have the exact coordinates. So
((X coordinate + X offset, Y coordinate + Y offset), (X coordinate + X offset, Y coordinate + Y offset))
How can I make this column?
Thanks in advance!