File:SpectreSolaireGradue DVD.jpg

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

Original file(1,278 × 268 pixels, file size: 39 KB, MIME type: image/jpeg)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: Solar spectrum with Fraunhofer lines (taken through a DVD as diffraction grating)
Français : Spectre solaire avec raies de Fraunhofer (photo d'une fente taillée au cutter à travers un DVD prise avec un Canon Powershot A70).
Date
Source Own work
Author Xofc

I am not 100% sure the scale is right. Pas sûr que l'échelle soit vraiment correcte.
(It is a screenshot of an SVG file displayed by Firefox)

The code is not perfect, but looks like this :

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="2200" height="512" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" >

<g stroke="black" id="marques"></g>
<script type="text/javascript">
<![CDATA[
var SVG_NS ="http://www.w3.org/2000/svg";
var SVG_LNK = "http://www.w3.org/1999/xlink";
const pi=3.141592754
var doc=document.getElementById("marques");
// jpeg
myjpg= document.createElementNS(SVG_NS, "image");
myjpg.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "SpectreSolaireRedresse.jpg");
margex = 50; margey = 50;
image_height = 202; image_width = 2020;
myjpg.setAttribute("x", margex);
myjpg.setAttribute("y", margey);
myjpg.setAttribute("width", image_width);
myjpg.setAttribute("height", image_height);
doc.appendChild(myjpg);

<!-- ****** spectre solaire ******* -->
// Pointage des raies avec GIMP
px1=1566; lambda1=589.0; <!-- Doublet Na -->
px2=987; lambda2=518.3; <!-- Triplet Mg -->
// Parametres d'interpolation
alpha = (px1 - px2) / (lambda1 - lambda2);
beta = px1 - alpha * lambda1;

for (lambda = 300; lambda < 700; lambda += 2)
	{
	x = Math.round(lambda * alpha + beta) + margex;
	if (x < margex)
		continue;
	if (x > (image_width + margex))
		break;
	mygrad = document.createElementNS(SVG_NS, "line");
	mygrad.setAttribute("x1", x);
	mygrad.setAttribute("x2", x);
	mygrad.setAttribute("y1", margey + image_height);
	if ((lambda % 10) == 0)
		mygrad.setAttribute("y2", margey + image_height + 20);
	else	mygrad.setAttribute("y2", margey + image_height + 10);
	mygrad.setAttribute("style", "stroke:rgb(99,99,99);stroke-width:2");
	doc.appendChild(mygrad);
	if (lambda % 10)
		continue;
	mygradtxt = document.createElementNS(SVG_NS, "text");
	mygradtxt.setAttribute("x", x);
	mygradtxt.setAttribute("y", margey + image_height + 30);
	mygradtxt.setAttribute("stroke-width", "0.3");
	mygradtxt.setAttribute("style", "font-size:12px;");
	doc.appendChild(mygradtxt);
	
	var mytext = document.createTextNode(lambda);
	mygradtxt.appendChild(mytext);
	}

]]>
</script>
</svg>

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International, 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic 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.
You may select the license of your choice.

File history

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

Date/TimeThumbnailDimensionsUserComment
current16:21, 24 March 2011Thumbnail for version as of 16:21, 24 March 20111,278 × 268 (39 KB)Xofc (talk | contribs){{Information |Description ={{en|1=Solar spectrum with Fraunhofer lines (taken through a DVD as diffraction grating) }} {{fr|1=Spectre solaire avec raies de Fraunhofer (photo d'une fente taillée au cutter à travers un DVD prise avec un Canon Powersho

There are no pages that use this file.

Metadata