<tooltip>
TimeLapse preset for 240 positions with 0 pitch increment and 0.1 yaw increment
</tooltip>
Top,Left Top,Right
2 1 --> <--4 5
| ------------------- |
| |\ 3 6 /| |
\|/| \ / | \|/
| \ / |
| |
| |
| |
/|\| / \ | /|\
| | / \ | |
11| |/12 9\| |
------------------- 8
10--> <--7
Bottom,Left Bottom,Right
0 ========> "Yaw Direction" as Empty, "Pitch Direction" as Empty (Not in the above picture - For static timelapse)
1 ========> "Yaw Direction" as Right, "Pitch Direction" as Empty
2 ========> "Yaw Direction" as Empty, "Pitch Direction" as Down
3 ========> "Yaw Direction" as Right, "Pitch Direction" as Down
4 ========> "Yaw Direction" as Left, "Pitch Direction" as Empty
5 ========> "Yaw Direction" as Empty, "Pitch Direction" as Down
6 ========> "Yaw Direction" as Left, "Pitch Direction" as Down
7 ========> "Yaw Direction" as Left, "Pitch Direction" as Empty
8 ========> "Yaw Direction" as Empty, "Pitch Direction" as Up
9 ========> "Yaw Direction" as Left, "Pitch Direction" as Up
10========> "Yaw Direction" as Right, "Pitch Direction" as Empty
11========> "Yaw Direction" as Empty, "Pitch Direction" as Up
12========> "Yaw Direction" as Right, "Pitch Direction" as Up
<!--
! This program is to generate preset for the Papywizard
! program. This program can be used for commercial and/or
! non-commercial use for free.
!
! Author: Jones Henry Subbiah (C) 2009.
!
! Disclaimer: The user assumes the responsibility of any
! any demage using the preset. The author is not responsible
! for anything.
!
! The preset generated assumes top-left corner of the pano
! is the home position that is yaw = 0, and pitch = 0. The
! name of the preset will be <total positionn>_<shots per position>_<pitch inc>_<yaw inc>.
!
! History of changes:
! ====================
! 0.1 Initial public version
! 0.2 Added history of changes to track
!
-->
<html>
<head>
<title>Papywizard Time Lapse Preset Generator</title>
<script language="Javascript">
var PREVIEW_STEP = 5;
var DEBUG = false;
var RAMP_STEP = 4;
var pval = '';
/*
* This function appends the message to the text box.
*/
function write ( message )
{
pval += message + "\n";
}
/*
* This function appends debug messages to the text box.
*/
function debug ( message )
{
if ( DEBUG )
write ( message );
}
/*
* This function validates the input.
* Input validation is done only for text box fields.
*/
function validate_input()
{
if ( isNaN ( parseInt ( document.main.np.value ) ) )
{
alert ( "Enter a valid value for number of shots" );
document.main.np.select();
document.main.np.focus();
return false;
}
return true;
}
/*
* This function rounds a number to a single decimal precision.
* The trick to is to add 0.05 to the number and truncate at the first
* decimal position.
*/
function round21 ( number )
{
nnum = number + 0.05;
nums = nnum.toString();
numa = nums.split('.');
return ( numa[0] + '.' + numa[1].charAt(0) );
}
/*
* This function is the main function that creates the full preset XML.
*/
function do_tl()
{
var np = 0;
var yd = '';
var pd = '';
var ypp = 0.0;
var ppp = 0.0;
var spp = 1;
var ns = 0;
var yaw = 0.0;
var pitch = 0.0;
var iy = 0.0;
var ip = 0.0;
var rup = 0;
var prvw_prst = '';
var prvw_pos = 0;
var cur_line = '';
var partial = false;
var nrus = 0;
var yinc = 0.0;
pval = '';
if ( validate_input() )
{
np = parseInt ( document.main.np.value );
ypp = parseFloat ( document.main.ypp.options[document.main.ypp.selectedIndex].value );
ppp = parseFloat ( document.main.ppp.options[document.main.ppp.selectedIndex].value );
yd = document.main.yd.options[document.main.yd.selectedIndex].value;
pd = document.main.pd.options[document.main.pd.selectedIndex].value;
spp = document.main.spp.options[document.main.spp.selectedIndex].value;
iy = parseFloat ( document.main.iy.value );
ip = parseFloat ( document.main.ip.value );
debug ( "np: " + np );
debug ( "ypp: " + ypp );
debug ( "ppp: " + ppp );
debug ( "yd: " + yd );
debug ( "pd: " + pd );
debug ( "spp: " + spp );
debug ( "iy: " + iy );
debug ( "ip " + ip );
nps = Math.floor ( np / PREVIEW_STEP );
debug ( "nps: " + nps );
prvw_pos = nps;
if ( iy != 9999 || ip != 9999 )
{
partial = true;
yaw = iy;
pitch = ip;
debug ( "yaw: " + yaw );
debug ( "pitch: " + pitch );
}
if ( ! partial )
{
write ( '<?xml version="1.0" encoding="utf-8"?>\n' );
write ( '<papywizard>\n' );
write ( ' <preset name="' + np + '_' + spp + '_' + ppp + '_' + ypp + '">' );
write ( ' <tooltip>' );
write ( ' TimeLapse preset for ' + np + ' positions with ' + ppp + ' pitch increment and ' + ypp + ' yaw increment' );
write ( ' </tooltip>' );
write ( ' <shoot>' );
}
for ( var ctr = 0; ctr < np; ctr++ )
{
cur_line = ' <pict yaw="' + yd + round21 ( yaw ) + '" pitch="' + pd + round21 ( pitch ) + '"/>';
if ( ctr == 0 )
{
prvw_prst += cur_line + '\n';
}
if ( ctr == prvw_pos )
{
prvw_prst += cur_line + '\n';
prvw_pos += nps;
}
if ( ctr == ( np - 1 ) )
{
prvw_prst += cur_line;
}
for ( var ctr2 = 0; ctr2 < spp; ctr2++ )
{
write ( cur_line );
}
if ( yd != '' )
yaw += ypp;
if ( pd != '' )
pitch += ppp;
}
if ( ! partial )
{
write ( ' </shoot>' );
write ( ' </preset>\n' );
}
/*
* Create a preview preset that travels along the path of the time lapse.
*/
if ( ! partial )
{
write ( ' <preset name="' + np + '_' + spp + '_' + ppp + '_' + ypp + '_preset">' );
write ( ' <tooltip>' );
write ( ' A preview preset for the following that travels through the time lapse path' );
write ( ' TimeLapse preset for ' + np + ' positions with ' + ppp + ' pitch increment and ' + ypp + ' yaw increment' );
write ( ' </tooltip>' );
write ( ' <shoot>' );
write ( prvw_prst );
write ( ' </shoot>' );
write ( ' </preset>\n' );
write ( '</papywizard>' );
}
document.main.preset.value = pval;
}
}
</script>
</head>
<body onload="document.main.preset.value = '';" bgcolor="#cccccc">
<form name="main">
<table border="0" cellspacing="2" cellpadding="2" width="700">
<tr>
<td>Total positions</td>
<td>
<input type="text" name="np" value="240" style="width:100px">
</td>
<td>Yaw Direction</td>
<td>
<select name="yd" style="width:100px">
<option value=""></option>
<option value="+" selected>Right</option>
<option value="-">Left</option>
</select>
</td>
<td>Yaw per position</td>
<td>
<select name="ypp" style="width:100px">
<option value="0.0">0.0</option>
<option value="0.1" selected>0.1</option>
<option value="0.2">0.2</option>
<option value="0.3">0.3</option>
<option value="0.4">0.4</option>
<option value="0.5">0.5</option>
<option value="0.6">0.6</option>
<option value="0.7">0.7</option>
<option value="0.8">0.8</option>
<option value="0.9">0.9</option>
<option value="1.0">1.0</option>
<option value="1.1">1.1</option>
<option value="1.2">1.2</option>
<option value="1.3">1.3</option>
<option value="1.4">1.4</option>
<option value="1.5">1.5</option>
<option value="1.6">1.6</option>
<option value="1.7">1.7</option>
<option value="1.8">1.8</option>
<option value="1.9">1.9</option>
<option value="2.0">2.0</option>
<option value="3.0">3.0</option>
<option value="4.0">4.0</option>
<option value="5.0">5.0</option>
<option value="6.0">6.0</option>
<option value="7.0">7.0</option>
<option value="8.0">8.0</option>
<option value="9.0">9.0</option>
<option value="10.0">10.0</option>
</select>
</td>
</tr>
<tr>
<td>Pitch Direction</td>
<td>
<select name="pd" style="width:100px">
<option value="" selected></option>
<option value="+">Up</option>
<option value="-">Down</option>
</select>
</td>
<td>Pitch per position</td>
<td>
<select name="ppp" style="width:100px">
<option value="0.0" selected>0.0</option>
<option value="0.1">0.1</option>
<option value="0.2">0.2</option>
<option value="0.3">0.3</option>
<option value="0.4">0.4</option>
<option value="0.5">0.5</option>
<option value="0.6">0.6</option>
<option value="0.7">0.7</option>
<option value="0.8">0.8</option>
<option value="0.9">0.9</option>
<option value="1.0">1.0</option>
<option value="1.1">1.1</option>
<option value="1.2">1.2</option>
<option value="1.3">1.3</option>
<option value="1.4">1.4</option>
<option value="1.5">1.5</option>
<option value="1.6">1.6</option>
<option value="1.7">1.7</option>
<option value="1.8">1.8</option>
<option value="1.9">1.9</option>
<option value="2.0">2.0</option>
<option value="3.0">3.0</option>
<option value="4.0">4.0</option>
<option value="5.0">5.0</option>
<option value="6.0">6.0</option>
<option value="7.0">7.0</option>
<option value="8.0">8.0</option>
<option value="9.0">9.0</option>
<option value="10.0">10.0</option>
</select>
</td>
<td>Shots per Position</td>
<td>
<select name="spp" style="width:100px">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
</td>
</tr>
<tr>
<td>Initial Yaw</td>
<td>
<input type="text" name="iy" style="width:100px" value="9999">
</td>
<td>Initial Pitch</td>
<td>
<input type="text" name="ip" style="width:100px" value="9999">
</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="5">Preset</td>
<td>
<input type="button" value="Generate" style="width:100px" onClick="do_tl()">
</td>
</tr>
<tr>
<td colspan="6">
<textarea name="preset" rows="18" cols="83"></textarea>
</td>
</tr>
</table>
</form>
</body>
</html>
claudevh wrote:Hi Olihar,
I think that such a little increment will not be accurate in absolute value !
But this mount is a "astronomical" mount and the slowest speed is = 1 x "sideral" = 1° / 4 minutes
So you have an idea of the timelapse capability ...!!!
Users browsing this forum: No registered users and 0 guests