from PIL import Image, ImageDraw

def create_image_with_dots(width, height, coordinates, dot_size=5, output_file="output3.jpg"):
    # Create a new white image
    image = Image.new("RGB", (width, height), "blue")
    
    # Create a drawing object
    draw = ImageDraw.Draw(image)
    
    # Draw black dots at the specified coordinates
    for dot_x, dot_y in coordinates:
        draw.ellipse([((dot_x*width/400) + width/2 - dot_size//2, (dot_y*height/200) + height/2 - dot_size//2), 
                      ((dot_x*width/400) + width/2 + dot_size//2, (dot_y*height/200) + height/2 + dot_size//2)], 
                     fill="black")
    
    # Save the image
    image.save(output_file, "JPEG")
    print(f"Image saved as {output_file}")

# Example usage 90, -90 -180, 180
coordinates = [ 
    (0, 0),(-40, -40),(175, 85),(10, 20),(-10, 20),(175, -85),(-175, 85)
]

create_image_with_dots(1280, 760, coordinates)