from ladybug_geometry.geometry2d.pointvector import Point2D # create a Point2D object with coordinates (2, 5) my_point = Point2D(2, 5) # print the coordinates of the point print(my_point.x, my_point.y) # output: 2, 5
from ladybug_geometry.geometry2d.pointvector import Point2D # create two Point2D objects point_a = Point2D(2, 5) point_b = Point2D(8, 12) # calculate the distance between the two points distance = point_a.distance_to_point(point_b) # print the distance print(distance) # output: 8.602325267042627
from ladybug_geometry.geometry2d.pointvector import Point2D # create a Point2D object with coordinates (2, 5) my_point = Point2D(2, 5) # scale the point by a factor of 2 my_point *= 2 # print the new coordinates of the point print(my_point.x, my_point.y) # output: 4, 10Overall, the Point2D class from the ladybug_geometry.geometry2d.pointvector module is useful for representing points in 2D space and performing geometric calculations involving 2D points.