POV-Ray : Newsgroups : povray.binaries.images : Ping Pong Server Time
2 Aug 2024 00:15:49 EDT (-0400)
  Ping Pong (Message 11 to 20 of 34)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: alphaQuad
Subject: Re: Ping Pong
Date: 22 Mar 2008 18:15:00
Message: <web.47e5917841aa233d1b8ed7370@news.povray.org>
"alphaQuad" <alp### [at] earthlinknet> wrote:
> making 3000 star cat with more data but running into typecast issues.
>
> #declare catalog2 = array[1][7] {
> { "5.1","23","2.606","41.757778","A3","107.18092300280163","And 02" }
> }
> works. typecast (float)string, then ok but I am not finding that.
>
> #declare catalog = array[1][7] {
> { 5.1,23,2.606,41.757778,"A3",107.18092300280163,"And 02" }
> }
> fails of course.
>
> whats the solution besides 2 arrays, a string and float array?

val(s)


Post a reply to this message

From: alphaQuad
Subject: Re: Ping Pong
Date: 22 Mar 2008 22:45:01
Message: <web.47e5d15341aa233d1b8ed7370@news.povray.org>
Here's a preview of the 3000 star colored cat, need to adjust colors but that
isnt the prob.

If I increase mag > 2 or so, I get too many objects. So the plan is to invert
cam matrix and pop world matrix and figure focal length to see if a star is in
the frame. That will take care of "error: too many nested objects".

Now is that really "too many" or the method in use? Because it only errors if
the mag is pushed up. strange.

Does anyone really want a planetarium? Because it is about to happen.


Post a reply to this message


Attachments:
Download 'planete3.png' (41 KB)

Preview of image 'planete3.png'
planete3.png


 

From: alphaQuad
Subject: Re: Ping Pong
Date: 23 Mar 2008 01:25:01
Message: <web.47e5f70341aa233d1b8ed7370@news.povray.org>
had to rewrite the stars func

here is "forward" RA 90 or Orion's Belt.

Someone want to make a cool star object? hmmm?

#macro star(radius,pos,color)
blah
#end

to replace:
sphere { _v, rad pigment { rgb starcolor(Cat[i][6]) } finish { ambient 1 diffuse
0 } }

invertmatrix is done, for now there are no stars behind the cam


Post a reply to this message


Attachments:
Download 'planete4.png' (46 KB)

Preview of image 'planete4.png'
planete4.png


 

From: alphaQuad
Subject: Re: Ping Pong
Date: 23 Mar 2008 10:30:01
Message: <web.47e676c841aa233de52dcb710@news.povray.org>
Now for Kepler, orbital elements, period/moon rot sync, lots to do.

Size of func that describes the progressive lunar orbit is staggering and
incredibly accurate. If anyone wants to translate something, let me know.


Got too late last night, here is previous Orion shot,3133 starCat.


Post a reply to this message


Attachments:
Download 'flam_bayer3133.zip' (305 KB)

From: alphaQuad
Subject: Re: Ping Pong
Date: 24 Mar 2008 00:35:00
Message: <web.47e73cdd41aa233d34ef70380@news.povray.org>
Did'nt have much time today (or lastnight) obviously this is just preview code
and much will change with correct design. (still need a star, people must not
want this much)

Update:
//rearview (camera must be co-set)
#declare cameramatrix = array[16] { -1.0, 0.0, 0.0 0.0,
 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0 }

//#declare cameramatrix = array[16] { 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1 }
#declare  worldmatrix = array[16] { 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1 }
//Stars(400, 512, 60, 70)
#macro Stars(minmag, w, an, fac)
  #local ab = invertmatrix(cameramatrix,worldmatrix);
  #local stars=union {
     #local m=0.00058/(w/800)/(50/an);
     #local i=0;
     #while (i<dimension_size(Cat, 1))
       #local rad=(abs(((val(Cat[i][0]) + 2.4) - 16.6)) - 2) *fac;
       //*$asa-sin(%PI.5,637,%a)
       #if (rad < minmag) #local rad = minmag; #end

       #local ra=val(Cat[i][1])*15+val(Cat[i][2])*0.25;
       #local dec=val(Cat[i][3]);
       #local _v = <cos(radians(ra))*cos(radians(dec)), sin(radians(dec)),
          sin(radians(ra))*cos(radians(dec))>;

       #local _v = _v*300000; //distance cant used now val(Cat[i][4])
       #local ab = pop_matrix(worldmatrix,_v)
       #if (ab.z > 0.0)

         #if (mod(i,2) = 0)
           text {
             ttf "Arial.ttf" Cat[i][5] 1 0 scale<8, 8, .000001>
             texture {
               pigment { rgb starcolor(Cat[i][6]) }
               finish { ambient 1 diffuse 0 }
             }
             translate <0,0,800>
             rotate <-dec,0,0>
             rotate <0,-ra+90,0>
           }#end
         sphere { _v, rad pigment { rgb starcolor(Cat[i][6]) }
           finish { ambient 1 diffuse 0 }
         }
       #end
       #declare i=i+1;
     #end
  }
  object { stars }
#end

other stuff to think about ***************************

To set the size of a sphere, you will use a formula that looks something like
the following:

    * Sphere radius = k * sqrt(L/L0)

where L is the star's true luminosity and L0 is some reference value for that
luminosity -- for example, L0 might be the luminosity of the Sun, so L would
then be in multiples of solar luminosity.

Since it's the sphere's radius, not area, that the POV-Ray
sphere object expects to see, we need the square root of the whole thing.
Doubling the luminosity doubles the star's apparent area. The constant k will
adjust the ratio L/L0 into an appropriate value for POV-Ray; we can figure it
out later while doing some test traces.

If you're pulling data straight from a star catalog, you're
probably either extracting or calculating the absolute
magnitude instead of a luminosity. They're closely related, however. The
relationship between luminosity L and absolute magnitude MV is given by:

    * MV = MV0 + 2.5 log (L / L0)

where L0 and MV0 are the reference values (i.e. star with luminosity L0 has
absolute magnitude MV0).

This means we can rewrite the sphere radius formula as:

    * Sphere radius = k * sqrt(10(0.4 * [MV - MV0]))

To simplify things, we can choose the reference magnitude,
MV0, to equal 0. Then:

    * Sphere radius = k * sqrt(10(0.4 * MV))

Problems with the simple model

This simple model is good in many respects, but it has one big flaw: it is very
difficult to get realistic star images over a wide range of magnitudes. In
particular, stars that are very bright as seen from Earth, such as Sirius, tend
to look like big disks, whereas dim stars tend to fade out altogether.
A simple fix

One solution to this is to "compress" the symbol range according to the apparent
magnitude of the stars. This results in a formula for sphere size that looks
like the following:

    * Sphere radius = k * sqrt(10(0.4 * MV)) * (B/B0)n

where B is the apparent brightness of a star, B0 some reference brightness, and
n is a number between 0 and -1. The value n effectively decreases the sphere
size for stars with large B, and increases it for stars of small B. The
brightness ratio can be determined from apparent magnitudes much as the
luminosity ratio could be determined from absolute magnitudes:

    * V = V0 + 2.5 log (B / B0)
    * B / B0 = 10(0.4 * [V - V0])

Thus you could set a reference magnitude roughly in the middle of the naked-eye
range, such as +3, and a value of n around -0.5 or so, to uniformly shrink the
largest stars and enlarge the smallest ones.


Post a reply to this message


Attachments:
Download 'planete5.png' (49 KB)

Preview of image 'planete5.png'
planete5.png


 

From: alphaQuad
Subject: Re: Ping Pong
Date: 24 Mar 2008 00:50:00
Message: <web.47e7406441aa233d34ef70380@news.povray.org>
hmm.. previous post should read 10 to the power of: sqrt(10(^)

sqrt(10^(0.4 * MV)

in case you were wondering

http://www.astronexus.com/node/105


Post a reply to this message

From: alphaQuad
Subject: Re: Ping Pong
Date: 24 Mar 2008 10:05:03
Message: <web.47e7c2b341aa233d87aa2f830@news.povray.org>
for the astronuts:

ANDROMEDA (And, ANDROMEDAE): daughter of Cassiopeia
ANTLIA (Ant, ANTLIAE): pump
APUS (Aps, APODIS): bird of paradise
AQUARIUS (Aqr, AQUARII): water carrier
AQUILA (Aql, AQUILAE): eagle
ARA (Ara, ARAE): altar
ARIES (Ari, ARIETIS): ram
AURIGA (Aur, AURIGAE): charioteer
BOOTES (Boo, BOOTIS): oxherd
CAELUM (Cae, CAELI): graving tool
CAMELOPARDALIS (Cam, CAMELOPARDALIS): giraffe
CANCER (Cnc, CANCRI): crab
CANES VENATICI (CVn, CANUM VENATICORUM): hunting dogs
CANIS MAJOR (CMa, CANIS MAJORIS): greater dog
CANIS MINOR (CMi, CANIS MINORIS): lesser dog
CAPRICORNUS (Cap, CAPRICORNI): horned goat
CARINA (Car, CARINAE): keel of the Argo
CASSIOPEIA (Cas, CASSIOPEIAE): wife of Cepheus
CENTAURUS (Cen, CENTAURI): centaur
CEPHEUS (Cep, CEPHEI): king of Ethiopia or Joppa
CETUS (Cet, CETI): reptile menacing Andromeda
CHAMAELEON (Cha, CHAMAELEONTIS): chamaeleon
CIRCINUS (Cir, CIRCINI): a pair of compasses
COLUMBA (Col, COLUMBAE): dove
COMA BERENICES (Com, COMAE BERENICES): Bernice's lock of hair
CORONA AUSTRALIS (CrA, CORONAE AUSTRALIS): southern crown
CORONA BOREALIS (CrB, CORONAE BOREALIS): northern crown
CORVUS (Crv, CORVI): crow
CRATER (Crt, CRATERIS): cup
CRUX (Cru, CRUCIS): cross
CYGNUS (Cyg, CYGNI): swan
DELPHINUS (Del, DELPHINI): dolphin
DORADO (Dor, DORADUS): goldfish
DRACO (Dra, DRACONIS): dragon
EQUULEUS (Equ, EQUULEI): little horse
ERIDANUS (Eri, ERIDANI): river
FORNAX (For, FORNACIS): furnace
GEMINI (Gem, GEMINORIUM): twins, Castor and Pollux
GRUS (Gru, GRUIS): crane
HERCULES (Her, HERCULIS): Heracles, the hero
HOROLOGIUM (Hor, HOROLOGII): clock
HYDRA (Hya, HYDRAE): water serpent (female)
HYDRUS (Hyi, HYDRI): water serpent (male)
INDUS (Ind, INDI): (American) Indian
LACERTA (Lac, LACERTAE): lizard
LEO (Leo, LEONIS): lion
LEO MINOR (LMi, LEONIS MINORIS): lesser lion
LEPUS (Lep, LEPORIS): hare
LIBRA (Lib, LIBRAE): scales (weighing)
LUPUS (Lup, LUPI): wolf
LYNX (Lyn, LYNX): lynx
LYRA (Lyr, LYRAE): lyre
MENSA (Men, MENSAE): table (mountain)
MICROSCOPIUM (Mic, MICROSCOPII): microscope
MONOCEROS (Mon, MONOCEROTIS): unicorn
MUSCA (Mus, MUSCAE): fly
NORMA (Nor, NORMAE): carpenter's level
OCTANS (Oct, OCTANTIS): octant
OPHIUCHUS (Oph, OPHIUCHI): snake holder
ORION (Ori, ORIONIS): hunter
PAVO (Pav, PAVONIS): peacock
PEGASUS (Peg, PEGASI): winged horse
PERSEUS (Per, PERSEI): rescuer of Andromeda
PHOENIX (Phe, PHOENICIS): phoenix
PICTOR (Pic, PICTORIS): painter (originally his easel)
PISCES (Psc, PISCIUM): fish
PISCIS AUSTRINUS (PsA, PISCIS AUSTRINI): southern fish
PUPPIS (Pup, PUPPIS): poop deck of the Argo
PYXIS (Pyx, PYXIDIS): box, or compass, of the Argo
RETICULUM (Ret, RETICULI): net (optical instrument)
SAGITTA (Sge, SAGITTAE): arrow
SAGITTARIUS (Sgr, SAGITTARII): archer
SCORPIUS (Sco, SCORPII): scorpion
SCULPTOR (Scl, SCULPTORIS): sculptor (originally his studio)
SCUTUM (Sct, SCUTI): shield
SERPENS (Ser, SERPENTIS): snake
SEXTANS (Sex, SEXTANTIS): sextant
TAURUS (Tau, TAURI): bull
TELESCOPIUM (Tel, TELESCOPII): telescope
TRIANGULUM (Tri, TRIANGULI): triangle
TRIANGULUM AUSTRALE (TrA, TRIANGULI AUSTRALIS): southern triangle
TUCANA (Tuc, TUCANAE): toucan
URSA MAJOR (UMa, URSAE MAJORIS): greater bear
URSA MINOR (UMi, URSAE MINORIS): lesser bear
VELA (Vel, VELORUM): sails of the Argo
VIRGO (Vir, VIRGINIS): virgin
VOLANS (Vol, VOLANTIS): flying fish
VULPECULA (Vul, VULPECULAE): little fox


Post a reply to this message

From: alphaQuad
Subject: Re: Ping Pong
Date: 24 Mar 2008 11:05:01
Message: <web.47e7d07241aa233d87aa2f830@news.povray.org>
Compelling to me (given what I've seen) that there is a Reptile menacing
Andromeda daughter of Cassiopeia in the skyology, but then I am getting
off-topic arent I.

(Or on-topic no one cares to think about)


Here is And with a Lac on her mind and Cetus, the cause.


Post a reply to this message


Attachments:
Download 'and_cetus.jpg' (53 KB)

Preview of image 'and_cetus.jpg'
and_cetus.jpg


 

From: Kirk Andrews
Subject: Re: Ping Pong
Date: 24 Mar 2008 11:05:01
Message: <web.47e7d07741aa233db555cae70@news.povray.org>
No one's going to add some moons?
Or a giant space craft of some kind?


Post a reply to this message

From: alphaQuad
Subject: Re: Ping Pong
Date: 24 Mar 2008 11:55:00
Message: <web.47e7dc6241aa233d87aa2f830@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
> No one's going to add some moons?
> Or a giant space craft of some kind?

I was kind of waiting for Kepler and everything in their place, but hey, go for
it (or help in the translation).


double SolveKepler(double M, double ec) {
  double E, d, delta;
  E = M;
  d = E - ec * sin(E) - M;
  while (fabs(d) > 1.0E-8) {
    delta = d / (1.0L - ec * cos(E));
    E = E - delta;
    d = E - ec * sin(E) - M;
  }
  return E;
}


Orbital************ string/calc/backtoString
 /* days, .DailyMotion,  .MeanLongitude, .Perihelion,
 *.Eccentricity, .Semimajor, .AscendingNode,.Inclination
 */
  double M, e, E, r, v, o, p, i;
  M = atof(data) * atof(gettok(data,2,32));
  p = atof(gettok(data,4,32));
  M += atof(gettok(data,3,32)) - p;
  e = atof(gettok(data,5,32));
  E = SolveKepler(M, e);
  r = atof(gettok(data,6,32)) * (1.0 - e * cos(E));
  v = 2.0L * atan(sqrt((1.0L + e) / (1.0L - e)) * tan(E / 2.0L));
  o = atof(gettok(data,7,32));
  i = atof(gettok(data,8,32));
  v = v + p - o;
 e = sin(v);
 p = sin(o);
 o = cos(o);
 v = cos(v);
 M = cos(i);
 sprintf(data, "%f %f %f",
      r * (o * v - p * e * M),
      -r * (e * sin(i)),
      r * (p * v + o * e * M)
   );



I have about 30 planet moon/maps and there is orbital elements to do for about
100 solar system objects with a default moon map.

Everything is accurate except I may have fudged some of the moon meanlongitudes
from Mean anomaly at epoch (Mo) which was the only thing that confused me and
hopefully we will get some assistance on that. I am not holding my breath.


I almost forgot the final position is:
Eclipmatrix = 1.0 0.0 0.0 0.0 0.917491720124239 0.39775487866708 0.0
-0.39775487866708 0.91749172012424

which is calced evertime you run the program:
alias obliquity {
  var t = julian(time) - 2451545.0
  t = t / 36525
  return (-23.496932 + 0.86 * sin((0.01532 * (t + 4.4))))

  e = A+Bsin(C(T+D))



Last 5 million yrs obliquity of the equator on the moving

For the next one million years the range will be only

Yet it remains an approximation in which the amplitude
of the wave remains the same, while in reality
as seen from the results of the Milankovitch cycles,
irregular variations occur.

but the low value may

}

popmatrix(Eclipmatrix,0.0 1.0 0.0) ecliptic pole

Eclipmatrix =
rotate ID matrix <radians(obliquity),0,0)


All of this could be wrong but is what I have assumed.
Today obliquity = -23.437924

ra dec of stars are final in their current position, which means you'll be able
to point a camera at a star


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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