Examples of Star


Examples of com.hotmoka.examples.patterns.composite.Star

import com.hotmoka.examples.patterns.composite.Star;

public class Main {

  public static void main(String[] args) {
    Draw h = new H(), e = new E(), l = new L(), o = new O(), star = new Star();
    Draw hello = new HorizontalDraw(star, h, e, l, l, o, star);
    Draw frame = new FrameDraw(hello);
    System.out.println(frame);
    System.out.println(new HorizontalDraw(hello, frame));
  }
View Full Code Here

Examples of com.sap.hadoop.windowing.functions2.table.npath.SymbolFunction.Star

      ObjectInspector symbolExprOI = (ObjectInspector) symbolDetails[1];
      SymbolFunction sFn = new Symbol(symbolExprEval, symbolExprOI);
     
      if ( isStar )
      {
        sFn = new Star(sFn);
      }
      else if ( isPlus )
      {
        sFn = new Plus(sFn);
      }
View Full Code Here

Examples of gaiasimu.universe.source.stellar.Star

    Model model = new Model ( sim );
   
    StellarAstrometry astro = astTempErr.createAstrometry();
    model.setAstrometry ( astro );
    model.setRefAstro ( refAstro );
    Star star = stTemp.createStar ( astro );
    model.setStar ( star );
    for ( PlanetTemplate plTemp: plTemps )
    {
      PlanetTemplate plTempNew = plTemp.clone();
      if ( randIncl )
View Full Code Here

Examples of gaiasimu.universe.source.stellar.Star

   
    // Generate empty astrometry
    ComponentAstrometry primaryAstrometry = new ComponentAstrometry();
    ComponentPhotometry primaryPhotometry = new ComponentPhotometry(primaryAstrometry, magMv, 1.0e3 / astrometry.getVarpi(), vMinusI, absV);
   
    Star star = new Star(idRoot, primaryPhotometry, primaryAstrometry, starPhysicalParameters);
   
    return star;
   
  }
View Full Code Here

Examples of gaiasimu.universe.source.stellar.Star

    StarPhysicalParameters starPhysicalParameters =
//      new StarPhysicalParameters( teff, feH, logg, mass, spectralType, magBol, radius, pop);
      new StarPhysicalParameters(mass, spectralType, magBol, pop, feH, alphaE);
   
    // Eventually generate new star
    star = new Star(idRoot, photometry, stellarAstrometry, starPhysicalParameters);
    return star;
  }
View Full Code Here

Examples of gaiasimu.universe.source.stellar.Star

    //double radius   = 2.0;         // (Rsun?)
   
    // Generate solar system with star and planet

    ExoplanetSystem system = new ExoplanetSystem("GJ 876");
    Star star = system.createStar(spType, magMv, distance, vMinusI, absV, ra, dec, parallax, muRa, muDec, vRad, mass, magBol, pop, feH, alphaE);
    OrbitalParams orbParam = dmsSimuDU437.generateOrbitalParams(
        star, massPlanet / Math.sin(inclination), period, timePeriastron, eccentricity, omega2, nodeAngle, inclination);
    // StellarSource source = dmsSimuDU437.generateSystem( star, orbitalParams );
   
    // Copied for adjustment from DmsSimuDU437.java
   
    int nbCompanions = 1; // only one planet for the moment
    StellarSource[] components = new StellarSource[nbCompanions + 1];
    StellarAstrometry astrom = (StellarAstrometry) star.getAstrometry();
    double massM1 = ((StellarPhysicalParameters) star.getPhysParam()).getMass();
    double massM2 = Math.pow(massM1/orbParam.semiMajorAxis, 3./2.)*
    orbParam.period/GaiaParam.Nature.JULIANYEAR_DAY - massM1;
    massM2 *= GaiaParam.Nature.SUN_MASS/ GaiaParam.Nature.JUPITER_MASS;

    // init primary star

    long primaryID = star.getRootId();
    ComponentAstrometry primaryAstrometry = new ComponentAstrometry();

    ComponentPhotometry primaryPhotometry = new ComponentPhotometry(primaryAstrometry, magMv,
        distance, vMinusI, absV, star.getPhotometry().getExtinctionCurve());
    StarPhysicalParameters origPhys = star.getStarPhysicalParams();

    // TODO: some physical parameters of the primary may not be coherent anymore...
    StarPhysicalParameters primaryPhys = new StarPhysicalParameters(
        origPhys.getTeff(), origPhys.getFeH(), origPhys.getlogg(), origPhys.getAlphaElements(),
        origPhys.getMass(), origPhys.getSpectralType(), 10.0, origPhys.getMeanRadius(),
        origPhys.getStellarPop(), origPhys.getvsini());

    star = new Star(primaryID, primaryPhotometry, primaryAstrometry, primaryPhys);
    components[0] = star;

    //
    // init Planet
    //
    int compnb = 1;

    double tEqu2 = origPhys.getTeff() * Math.sqrt(origPhys.getMeanRadius() / (2 * orbParam.semiMajorAxis));
    tEqu2 *= Math.pow((1 - bondAlbedo), 1./4);
   
    // Calculating radius -- not necessary for astrometry, could be replaced by simpler model
    final double a[] = {1.2158123, -0.15080468, 0.69730554, -0.017303049, 0.00026388263, -1.2822719e-6,
      3.3135757e-9, -4.8366013e-12, 4.0017118e-15, -1.7477892e-18, 3.1347937e-22};
    double plRadius = a[0] + a[1] * Math.pow(mass, a[2]);
    for (int i = 3; i < a.length; i++) {
      plRadius += a[i] * Math.pow(mass, a[i - 2]);
    }
   
    plRadius *= GaiaParam.Nature.JUPITER_POLARRADIUS/GaiaParam.Nature.SUN_EQUATORIALRADIUS;
   
    // TODO put a correct value for absolute visual and bolometric magnitude, vsini, V-I
    double magMV2 = 32.58, MBol2 = magMV2-4; //Mag MV from Baraffe models.
    double vSini2 = 0, vmi2 = 9.9999;

    // Initialize ComponentAstrometry pointing to the primary and then correct with setCompanion()
    ComponentAstrometry compAstrom = new ComponentAstrometry(compnb, orbParam);
    ExoPlanetPhysicalParameters compPhys = new ExoPlanetPhysicalParameters(
        tEqu2, plRadius, vSini2, massM2
        / GaiaParam.Nature.SUN_MASS* GaiaParam.Nature.JUPITER_MASS, MBol2, primaryPhys) ;
   
    ComponentPhotometry compPhot = new ComponentPhotometry(compAstrom, magMV2,
        distance, vmi2, absV, star.getPhotometry().getExtinctionCurve());

    StellarSource comp = new ExoPlanet(primaryID, compPhot, compAstrom, compPhys);
    compPhot.setTargetAstroSource(comp);
    compAstrom.setTargetAstroSource(comp);
    compPhys.setTargetAstroSource(comp);

    components[compnb] = comp;

    // parameters for the stellar system itself
    StarSystem starSystem = new StarSystem(primaryID, components, astrom);
   
    // End of copied part
   
    if (starSystem == null)
      System.err.println("Source not generated!");
   
    // Create position vector
   
    GVector3d vICRS = new GVector3d(Math.toRadians(ra), Math.toRadians(dec));
    vICRS.scale(distance*GaiaParam.Nature.PARSEC_METER);
   
    // Compute the list of all the transits of Sirius in the FOV1
    // For the inverse scanning law, we need to give the half aperture of the field
   
    double halfAperture = GaiaParam.Satellite.FOV_AC*GaiaParam.Nature.DEGREE_RADIAN/2;
   
    // Create and initialize a Gaia instance with default values

    Gaia gaia = new Gaia();
   
    // This method returns the list of all the transits
   
    ArrayList<Transit> fov1Transits = gaia.attitude.inverseScan(vICRS, halfAperture, gaia.getTelescope(FoV.FOV1));
    ArrayList<Transit> fov2Transits = gaia.attitude.inverseScan(vICRS, halfAperture, gaia.getTelescope(FoV.FOV2));
    System.out.println("GJ 876 will transit "+fov1Transits.size()+" times in FOV1 during the mission.");
    System.out.println("GJ 876 will transit "+fov2Transits.size()+" times in FOV2 during the mission.");
   
    // Merge arrays
   
    ArrayList<Transit> allTransits = new ArrayList<Transit>();
    allTransits.addAll(fov1Transits);
    allTransits.addAll(fov2Transits);
   
    // Print astrometry information
   
    System.out.println("\n-- astrometric data -- ");
   
    for ( Transit tr : allTransits ) {
     
      final boolean relativity = false; // whether to include relativity
      final double lambda = 600.0; // wavelength in nm

      GaiaSimuTime time = tr.getGSTime();
      Astrometry ast = star.getAstrometry();
      double trAlpha = ast.getCoMRSAstrometricParam(time, relativity).getAlpha();
      double trDelta = ast.getCoMRSAstrometricParam(time, relativity).getDelta();
     
      GVector3d comrs = ast.getCoMRSPosition(time, relativity);
      System.out.println(comrs);
View Full Code Here

Examples of game.finalTypes.Star

    //earth.setRotation(new Vector(0, -0.006f, 0));
    Texture texEarth = TextureLoader.getTexture("JPG",
        ResourceLoader.getResourceAsStream("res/earth.jpg"))
    earth.setTexture(texEarth);
   
    sun = new Star(7000, 500);
    sun.setPosition(new Vector(-30000, 20000, -40000))
    //sun.setRotation(new Vector(0, -0.006f, 0));
    Texture texSun = TextureLoader.getTexture("JPG",
        ResourceLoader.getResourceAsStream("res/sun.jpg"))
    sun.setTexture(texSun);
View Full Code Here

Examples of micdoodle8.mods.galacticraft.api.galaxies.Star

        GL11.glEnable(GL11.GL_TEXTURE_2D);
    }
   
    private void drawCelestialBodies(CelestialBody body, float ticks)
    {
      Star star = null;
      SolarSystem solarSystem = null;
      if (body instanceof Planet)
        solarSystem = ((Planet)body).getParentSolarSystem();
      else if (body instanceof Moon)
        solarSystem = ((Moon)body).getParentPlanet().getParentSolarSystem();
      else if (body instanceof Satellite)
        solarSystem = ((Satellite)body).getParentPlanet().getParentSolarSystem();
     
      if (solarSystem == null)
        solarSystem = GalacticraftCore.solarSystemSol;
    star = solarSystem.getMainStar();

        if (star != null && star.getBodyIcon() != null)
        {
        this.drawCelestialBody(star, 0F, 0F, ticks, 6F);
        }

      String mainSolarSystem = solarSystem.getUnlocalizedName();
View Full Code Here

Examples of micdoodle8.mods.galacticraft.api.galaxies.Star

   
    private void drawCelestialBodies(float ticks)
    {
        for (SolarSystem solarSystem : GalaxyRegistry.getRegisteredSolarSystems().values())
        {
            Star star = solarSystem.getMainStar();

            if (star != null && star.getBodyIcon() != null)
            {
            this.drawCelestialBody(star, 0F, 0F, ticks, 5.5F);
            }
        }
View Full Code Here

Examples of micdoodle8.mods.galacticraft.api.galaxies.Star

        FloatBuffer fb = BufferUtils.createFloatBuffer(16 * Float.SIZE);
        HashMap<CelestialBody, Matrix4f> matrixMap = Maps.newHashMap();

        for (SolarSystem solarSystem : GalaxyRegistry.getRegisteredSolarSystems().values())
        {
            Star star = solarSystem.getMainStar();

            if (star != null && star.getBodyIcon() != null)
            {
                GL11.glPushMatrix();
                Matrix4f worldMatrix0 = new Matrix4f(worldMatrix);
               
                Matrix4f.translate(this.getCelestialBodyPosition(star), worldMatrix0, worldMatrix0);

                Matrix4f worldMatrix1 = new Matrix4f();
                Matrix4f.rotate((float) Math.toRadians(45), new Vector3f(0, 0, 1), worldMatrix1, worldMatrix1);
                Matrix4f.rotate((float) Math.toRadians(-55), new Vector3f(1, 0, 0), worldMatrix1, worldMatrix1);
                worldMatrix1 = Matrix4f.mul(worldMatrix0, worldMatrix1, worldMatrix1);

                fb.rewind();
                worldMatrix1.store(fb);
                fb.flip();
                GL11.glMultMatrix(fb);

                float alpha = 1.0F;

                if (this.selectedBody != null && this.selectedBody != star && this.selectionCount >= 2)
                {
                    alpha = 1.0F - Math.min(this.ticksSinceSelection / 25.0F, 1.0F);
                }

                if (this.selectedBody != null && this.selectionCount >= 2)
                {
                    if (star != this.selectedBody)
                    {
                        alpha = 1.0F - Math.min(this.ticksSinceSelection / 25.0F, 1.0F);

                        if (!(this.lastSelectedBody instanceof Star) && this.lastSelectedBody != null)
                        {
                            alpha = 0.0F;
                        }
                    }
                }

                if (alpha != 0)
                {
                    CelestialBodyRenderEvent.Pre preEvent = new CelestialBodyRenderEvent.Pre(star, star.getBodyIcon(), 8);
                    MinecraftForge.EVENT_BUS.post(preEvent);

                    GL11.glColor4f(1, 1, 1, alpha);
                    if (preEvent.celestialBodyTexture != null)
                    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.