Original file(Ogg Theora video file, length 5.0 s, 720 × 720 pixels, 2.19 Mbps, file size: 1.3 MB)


Wikimedia Commons Logo This free media file is from Wikimedia Commons. Its description page is included below.

Summary

Description
English: Animating effect of a changing offset parameter for a rose curve.
Date
Source Own work
Author Ldo

Generated with the following Python script, using the anim_framework classes:

#!/usr/bin/python3
import sys
import cairo
import colorsys
import anim_common
import anim_rose

drawing_size = (720, 720)
curve_size = 120
anim_duration = 5.0
frame_rate = 25
nr_steps = 1000

bg_color = colorsys.hsv_to_rgb(0, .05, .9)
fg_color = colorsys.hsv_to_rgb(.7, .7, .7)

def anim_init(g) :
    g.set_operator(cairo.OPERATOR_SOURCE)
    g.translate(drawing_size[0] / 2, drawing_size[1] / 2)
    g.set_font_size(24)
#end anim_init

def show_params(g, t) :
    offset = round(2 * curve_size * t / anim_duration)
    g.move_to(curve_size * 0.8, curve_size * 1.5)
    g.show_text("offset: %dpx" % offset)
#end show_params

curve = \
    anim_common.draw_compose \
      (
        anim_common.make_draw
          (
            ("set_source_rgb", bg_color),
            ("paint", ()),
            ("set_source_rgb", fg_color),
            ("set_line_width", (4,)),
          ),
        anim_rose.make_draw
          (
            amplitude = curve_size,
            freq = 5,
            offset = anim_common.linear_interpolator(0, anim_duration, 0, 2 * curve_size),
            phase = 0,
            nr_steps = nr_steps
          ),
        show_params,
      )

anim_common.render_anim \
  (
    width = drawing_size[0],
    height = drawing_size[1],
    start_time = 0,
    end_time = anim_duration,
    frame_rate = frame_rate,
    draw_frame = curve,
    overall_presetup = anim_init,
    out_dir = "frames",
    start_frame_nr = 1
  )

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

3 July 2014

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current10:05, 3 July 20145.0 s, 720 × 720 (1.3 MB)LdoUser created page with UploadWizard

There are no pages that use this file.

Metadata