<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.povray.org/content?action=history&amp;feed=atom&amp;title=Reference%3ASunpos.inc</id>
	<title>Reference:Sunpos.inc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.povray.org/content?action=history&amp;feed=atom&amp;title=Reference%3ASunpos.inc"/>
	<link rel="alternate" type="text/html" href="https://wiki.povray.org/content?title=Reference:Sunpos.inc&amp;action=history"/>
	<updated>2026-04-06T14:44:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.povray.org/content?title=Reference:Sunpos.inc&amp;diff=7072&amp;oldid=prev</id>
		<title>Jholsenback: 1 revision: Reference Migration Initial Load</title>
		<link rel="alternate" type="text/html" href="https://wiki.povray.org/content?title=Reference:Sunpos.inc&amp;diff=7072&amp;oldid=prev"/>
		<updated>2012-03-15T19:08:58Z</updated>

		<summary type="html">&lt;p&gt;1 revision: Reference Migration Initial Load&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:08, 15 March 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Jholsenback</name></author>
	</entry>
	<entry>
		<id>https://wiki.povray.org/content?title=Reference:Sunpos.inc&amp;diff=7071&amp;oldid=prev</id>
		<title>Jholsenback: 1 revision: Initial Load (TF)</title>
		<link rel="alternate" type="text/html" href="https://wiki.povray.org/content?title=Reference:Sunpos.inc&amp;diff=7071&amp;oldid=prev"/>
		<updated>2012-03-11T22:31:29Z</updated>

		<summary type="html">&lt;p&gt;1 revision: Initial Load (TF)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Include Files]]&lt;br /&gt;
&amp;lt;p&amp;gt; This file only contains the sunpos() macro&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:sunpos}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;sunpos(Year, Month, Day, Hour, Minute, Lstm, LAT, LONG)&amp;lt;/code&amp;gt;: The macro returns the position of the sun, for a given date, time, and location on earth. The suns position is also globally declared as the vector &amp;lt;code&amp;gt;SolarPosition&amp;lt;/code&amp;gt;. Two other declared vectors are the &amp;lt;code&amp;gt;Az&amp;lt;/code&amp;gt; (Azimuth) and &amp;lt;code&amp;gt;Al&amp;lt;/code&amp;gt; (Altitude), these can be useful for aligning an object (media container) with the sunlight. Assumption: in the scene north is in the +Z direction, south is -Z.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Year&amp;lt;/code&amp;gt;= The year in four digits.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Month&amp;lt;/code&amp;gt;= The month number (1-12).&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Day&amp;lt;/code&amp;gt;= The day number (1-31).&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Hour&amp;lt;/code&amp;gt;= The hour of day in 24 hour format (0-23).&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Minute&amp;lt;/code&amp;gt;= The minutes (0-59). &amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Lstm&amp;lt;/code&amp;gt;= Meridian of your local time zone in degrees (+1 hour = +15 deg, east = positive, west = negative)&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;LAT&amp;lt;/code&amp;gt;= Lattitude in degrees.decimal, northern hemisphere = positive, southern = negative&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;LONG&amp;lt;/code&amp;gt;=  Longitude in degrees.decimal, east = positive, west is negative&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Usage:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;amp;quot;sunpos.inc&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
light_source {&lt;br /&gt;
  //Greenwich, noon on the longest day of 2000&lt;br /&gt;
  SunPos(2000, 6, 21, 12, 2, 0, 51.4667, 0.00) &lt;br /&gt;
  rgb 1&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
cylinder{&lt;br /&gt;
  &amp;amp;lt;-2,0,0&amp;amp;gt;,&amp;amp;lt;2,0,0&amp;amp;gt;,0.1&lt;br /&gt;
  rotate &amp;amp;lt;0, Az-90, Al&amp;amp;gt;  //align cylinder with sun&lt;br /&gt;
  texture {...}&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;Note&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; The default distance of the sun from the origin is 1e+9 units.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jholsenback</name></author>
	</entry>
</feed>