POV-Ray : Newsgroups : povray.binaries.images : Ping Pong : Re: Ping Pong Server Time
2 Aug 2024 02:23:11 EDT (-0400)
  Re: Ping Pong  
From: alphaQuad
Date: 28 Mar 2008 02:20:00
Message: <web.47ec9b5041aa233d3bb21de50@news.povray.org>
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:

> > Hear's my suggestion for this ping-pong round.
>
> Okay, let's add a new "rule": If the thread dies for a while, somebody
> please start over with a new scene!

I think that means a new pingpong thread and new scene.


OK well, asking is really dead! lol

I figured out how to set julian AND ctime! woo hoo



#macro round(f,n)
  #local c = floor(pow(10.0,n));
  #local dd = 0.5 / c;
  #local dd = dd + abs(f);
  #local dd = dd * c;

  #local dd=floor(dd);
  #local dd = dd/c;
  #if (f < 0.0) #local dd = dd * -1; #end
  (dd)
#end

#macro julian(Y,M,D)
  #if (M < 3)
    #local Y = Y - 1;
    #local M = M + 12;
  #end
  #local A = floor(Y / 100.0);
  #local B = 2 - A + floor(A / 4.0);
  #local J = floor(365.25 * (Y + 4716.0)) + floor(30.6001 * (M + 1)) + D + B -
1524.5;
  J
#end
#macro j2ctime(j)
  //j2ctime(julian)
  #local s = j - 2440587.5;
  #local d = floor(s) * 86400;
  #local s = s - floor(s);
  #local s = s * 100000;
  round(s/1.157407407+d,0)
#end

/*
#version unofficial MegaPov 1.21; // 1.1 will work. but both freaking things
only have the program opening time!!
#declare JD = julian(val(date("%Y")),val(date("%m")),val(date("%d")));
echof(JD)
echof(j2ctime(JD))
echof(JD)   */


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.