This is a file from the Wikimedia Commons

File:Multiple 1-petal rose curves and it's miror images.svg

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Original file(SVG file, nominally 1,000 × 2,000 pixels, file size: 342 KB)

Summary

Description
English: Flower with 2 petals. Multiple 1-petal rose curves and its miror images created using maxima and defined by the polar equation with and a from 1 to 20
Date
Source Own work
Author Adam majewski
Other versions
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Gnuplot.
 
 This plot uses embedded text that can be easily translated using a text editor.
Source code
InfoField

Gnuplot code

/*

Batch file for Maxima CAS
save as a o.mac
run maxima :
       
 maxima
 
and then : 

batch("a.mac");

*/
kill(all);
remvalue(all);
ratprint:false; /*  It doesn't change the computing, just the warnings. */
display2d:false;
numer: true;

/* 
http://mathworld.wolfram.com/Rose.html
r = a* sin(n*t)

If n is odd, the rose is n-petalled. 
If n is even, the rose is 2n-petalled.


If n=r/s is a rational number, then the curve closes at a polar angle of theta=pi*s*p, where  
p=1 if r*s is odd 
p=2 if r*s is even.

 
If n is irrational, then there are an infinite number of petals.
*/

RoseCurve_Polar(n, a):= 
	/* polar(radius, ang, minang, maxang) */
	polar(a*sin(n*t),t,0,2*%pi)$

RoseCurves_Polar(n, aMin, aMax, aStep):= block(

	[a,l, ll],
	ll:[],
	for a:aMin step aStep thru aMax do (
		l:RoseCurve_Polar(n,a),
		ll: cons(l,ll), 
		l:RoseCurve_Polar(n,-a), /* mirror image */
		ll: cons(l,ll) 
	),
	
	return (ll)
)$

n:1;
ll:RoseCurves_Polar(n, 1, 20,0.5)$

load(draw);

/* strings */
path:""$ /*  if empty then file is in a home dir , path should end with "/" */ 
FileName:  string(n)$


draw2d(
	terminal      = svg,
	file_name = sconcat(path, FileName,""),
	title = "",
	dimensions = [1000, 2000], 
	nticks=300,
	ll)$

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

6 December 2018

File history

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

Date/TimeThumbnailDimensionsUserComment
current16:47, 6 December 2018Thumbnail for version as of 16:47, 6 December 20181,000 × 2,000 (342 KB)Soul windsurferUser created page with UploadWizard

The following page uses this file:

Metadata