File:Funktionsgraph z(Q) (0-9).svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 239 × 244 pixels, file size: 33 KB)

Captions

Captions

Graph of the function z(Q) = Q/2 (if Q is even) respectively (Q+9)/2 (if Q is odd) for Q∈N0 in interval [0..9]

Summary[edit]

Description
Deutsch: Funktionsgraph (im kartesischen Koordinatensystem) für für im Intervall [0..9]
English: Graph of the function (in Cartesian coordinate system) for in interval [0..9]
Date
Source Own work
Author SweetWood
Other versions Funktionsgraph Q(z) (0-9).svg
SVG development
InfoField
 
The SVG code is valid.
 
This vector image was created with Asymptote (dvisvgm used to convert PDF to SVG)
Source code
InfoField

Asymptote code

// created with Asymptote 2.47

import graph;
import settings;
outformat="pdf";

unitsize(6.2mm);

int Q_start = 0;  // start value for drawing graph of inverse function z(Q)
int Q_end   = 9;  // end value for drawing graph of inverse function z(Q)

// prove if the given number is even
// Parameters: n ... integer number
// Returns: true if n is even; false otherwise
//
bool isEven(int n) {
  return ((n % 2) == 0);
}

// prove if the given number is odd
// Parameters: n ... integer number
// Returns: true if n is odd; false otherwise
//
bool isOdd(int n) {
  return ((n % 2) != 0);
}

// calculate inverse function of Q
// Parameters: n ... integer number
// Returns: n/2 if n is even;
//          (n+9)/2 otherwise
//
int Qinverse(int n=0) {
  if (isEven(n)) { return (n # 2); }
  return ((n + 9) # 2);
}

// draw graph of inverse function z(Q)
pen graphPen = red + scale(2) * currentpen;
for (int Q = Q_start; Q < (Q_end + 1); ++Q) {
  dot( (Q, Qinverse(Q)), graphPen );
}

// axes
pen axesPen = gray(0.5) + dashed + linewidth(0.5*linewidth());
xaxis( "$Q$",
       BottomTop,
       LeftTicks(n=1, begin=false, end=false, extend=true, pTick=axesPen) );
yaxis( "$z(Q)$",
       LeftRight,
       RightTicks(n=1, begin=false, end=false, extend=true, pTick=axesPen) );

// label
real pos = (Q_end - Q_start) / 2.0;
label(scale(2) * "$z(Q)$", (pos, pos), graphPen);

Licensing[edit]

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.

File history

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

Date/TimeThumbnailDimensionsUserComment
current15:47, 29 October 2018Thumbnail for version as of 15:47, 29 October 2018239 × 244 (33 KB)SweetWood (talk | contribs)changed proportions for easier readability
15:35, 28 October 2018Thumbnail for version as of 15:35, 28 October 2018361 × 365 (34 KB)SweetWood (talk | contribs)improved graphics
15:40, 16 December 2016Thumbnail for version as of 15:40, 16 December 2016461 × 461 (34 KB)SweetWood (talk | contribs)auf quadratisches Bildformat umgestellt
15:27, 12 December 2016Thumbnail for version as of 15:27, 12 December 2016744 × 1,052 (33 KB)SweetWood (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata