I'll create a simple scene using Python with Pygame. This program represents a river flowing through a grass field with mountain peaks on the horizon:
import pygame
import math
# Initialize Pygame
pygame.init()
width, height = 800, 600
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption("River Valley Scene")
clock = pygame.time.Clock()
def draw_mountains(surface):
# Mountain peaks with layered ranges for depth
mountain_layers = [
{"peaks": [(100, 350), (250, 280), (400, 320), (550, 290), (700, 340), (800, 360)],
"color": (120, 130, 150)},
{"peaks": [(0, 380), (150, 320), (350, 350), (500, 310), (650, 360), (800, 390)],
"color": (140, 150, 170)},
{"peaks": [(0, 400), (200, 370), (450, 380), (600, 350), (800, 410)],
"color": (160, 170, 190)}
]
for layer in mountain_layers:
points = [(0, height)] + layer["peaks"] + [(width, height)]
pygame.draw.polygon(surface, layer["color"], points)
def draw_grass_field(surface):
# Base grass color
grass_color = (34, 139, 34)
surface.fill(grass_color, (0, 400, width, 200))
# Add grass texture with varying shades
for y in range(400, height, 3):
for x in range(0, width, 5):
shade = int(10 * math.sin(x * 0.01 + y * 0.02))
color = (34 + shade, 139 + shade, 34 + shade)
pygame.draw.line(surface, color, (x, y), (x + 2, y + 2))
def draw_river(surface, time):
# River path with sinusoidal curves
river_points = []
river_width = 60
for x in range(-50, width + 50, 10):
# Create meandering river path
y = 450 + 30 * math.sin(x * 0.01 + time * 0.001) + 20 * math.sin(x * 0.02)
river_points.append((x, y))
# Draw river banks
for i in range(len(river_points) - 1):
x1, y1 = river_points[i]
x2, y2 = river_points[i + 1]
# River water with gradient effect
for offset in range(river_width):
color_intensity = 155 + int(40 * math.sin(offset * 0.1))
water_color = (0, color_intensity, 200)
pygame.draw.line(surface, water_color,
(x1, y1 - river_width//2 + offset),
(x2, y2 - river_width//2 + offset), 2)
# Add water ripples
for i in range(0, width, 40):
ripple_x = i + 10 * math.sin(time * 0.002 + i * 0.1)
ripple_y = 450 + 30 * math.sin(i * 0.01 + time * 0.001)
pygame.draw.circle(surface, (100, 180, 255),
(int(ripple_x), int(ripple_y)),
int(5 + 3 * math.sin(time * 0.003 + i)), 1)
def draw_sky(surface):
# Gradient sky
for y in range(400):
ratio = y / 400
r = int(135 + 50 * ratio)
g = int(206 + 20 * ratio)
b = int(235 - 35 * ratio)
pygame.draw.line(surface, (r, g, b), (0, y), (width, y))
# Main loop
running = True
time = 0
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# Draw scene
draw_sky(screen)
draw_mountains(screen)
draw_grass_field(screen)
draw_river(screen, time)
pygame.display.flip()
clock.tick(60)
time += clock.get_time()
pygame.quit()
This program creates a scenic landscape with:
- Sky: A gradient from light blue at the top to slightly warmer tones near the horizon
- Mountains: Multiple layers of mountain ranges with different shades to create depth perception
- Grass Field: A textured green field with subtle variations in color
- River: A meandering river that flows through the scene with:
- Sinusoidal curves to create a natural winding path
- Water color gradients across the width
- Animated ripples that move with time
- Subtle animation in the river's flow
The scene uses mathematical functions to generate natural-looking curves and textures, and includes simple animations to bring the river to life. The layered approach creates a sense of depth from the distant mountains to the foreground grass field.