Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - pimathbrainiac

Pages: 1 ... 101 102 [103] 104 105 ... 125
1531
News / Re: Phantasy Star Dark Millenia Screenshots
« on: January 11, 2013, 09:42:47 pm »
And there goes my (somewhat) valid reason... Still hold the new record, though.

1532
News / Re: Phantasy Star Dark Millenia Screenshots
« on: January 11, 2013, 09:25:17 pm »
Hey, is there a link to this program anywhere? I am interested in being a NECROmancer to this program!!!  >:D

Spoiler For NECROmancer:
:evillaugh: :evillaugh: :evillaugh: :evillaugh: :evillaugh: :evillaugh: :evillaugh: :evillaugh: :evillaugh: :evillaugh:

Okay, for a time of almost eight years, I believe I now hold the record for longest NECROPOST!!!

Don't beat me in the name of the Holy Calculator, I honestly want to know what this is! The screenies won't load, and I want to know what calc games were like in 2005.

1533
Axe / Re: AXE Linking
« on: January 11, 2013, 01:19:18 pm »
Well, I hope I can get that working... Does it work with a direct link???

1534
Miscellaneous / FIRST Robotics Java Equations and Programming
« on: January 11, 2013, 01:14:03 pm »
For those in FRC, the challenge is complicated: Throw Frisbees accurately into goals.

I found this page that helps a ton with the physics and has an included Java program: http://web.mit.edu/womens-ult/www/smite/frisbee_physics.pdf

Good stuff to know.

I made a few modifications to the program to take input

This is the class with the main method:

Code: [Select]
package frisbee;

import java.util.Scanner;

public class FrisbeeCalc
{
public static Scanner sc = new Scanner(System.in);
public static Frisbee frisbee = new Frisbee();

public static double y0;
public static double vx0;
public static double vy0;
public static double alpha;
public static double deltaT;

@SuppressWarnings("static-access")
public static void main(String[] args)
{
System.out.print("initial y: ");
y0 = sc.nextDouble();
System.out.print("initial x velocity: ");
vx0 = sc.nextDouble();
System.out.print("initial y velocity: ");
vy0 = sc.nextDouble();
System.out.print("angle: ");
alpha = sc.nextDouble();
System.out.print("delta T: ");
deltaT = sc.nextDouble();

frisbee.simulate(y0, vx0, vy0, alpha, deltaT);
}
}

This is the Frisbee class:

Code: [Select]
package frisbee;

import java.lang.Math;
/**
* The class Frisbee contains the method simulate which uses Euler’s
* method to calculate the position and the velocity of a frisbee in
* two dimensions.
*
* @author Vance Morrison
* @version March 4, 2005
*/
public class Frisbee
{
    private static double x;
    //The x position of the frisbee.
    private static double y;
    //The y position of the frisbee.
    private static double vx;
    //The x velocity of the frisbee.
    private static double vy;
    //The y velocity of the frisbee.
    private static final double g = -9.81;
    //The acceleration of gravity (m/s^2).
    private static final double m = 0.175;
    //The mass of a standard frisbee in kilograms.
    private static final double RHO = 1.23;
    //The density of air in kg/m^3.
    private static final double AREA = 0.0568;
    //The area of a standard frisbee.
    private static final double CL0 = 0.1;
    //The lift coefficient at alpha = 0.
    private static final double CLA = 1.4;
    //The lift coefficient dependent on alpha.
    private static final double CD0 = 0.08;
    //The drag coefficent at alpha = 0.
    private static final double CDA = 2.72;
    //The drag coefficient dependent on alpha.
    private static final double ALPHA0 = -4;
    /**
    * A method that uses Euler’s method to simulate the flight of a frisbee in
    * two dimensions, distance and height (x and y, respectively).
    *
    */
    public static void simulate(double y0, double vx0, double vy0, double alpha, double deltaT)
    {
        //Calculation of the lift coefficient using the relationship given
        //by S. A. Hummel.
        double cl = CL0 + CLA*alpha*Math.PI/180;
        //Calculation of the drag coefficient (for Prantl’s relationship)
        //using the relationship given by S. A. Hummel.
        double cd = CD0 + CDA*Math.pow((alpha-ALPHA0)*Math.PI/180,2);
        //Initial position x = 0.
        x = 0;
        //Initial position y = y0.
        y = y0;
        //Initial x velocity vx = vx0.
        vx = vx0;
        //Initial y velocity vy = vy0.
        vy = vy0;
        //A loop index to monitor the simulation steps.
        int k = 0;
        //A while loop that performs iterations until the y position
        //reaches zero (i.e. the frisbee hits the ground).
        while(y>0)
        {
            //The change in velocity in the y direction obtained setting the
            //net force equal to the sum of the gravitational force and the
            //lift force and solving for delta v.
            double deltavy = (RHO*Math.pow(vx,2)*AREA*cl/2/m+g)*deltaT;
            //The change in velocity in the x direction, obtained by
            //solving the force equation for delta v. (The only force
            //present is the drag force).
            double deltavx = -RHO*Math.pow(vx,2)*AREA*cd*deltaT;
            //The new positions and velocities are calculated using
            //simple introductory mechanics.
            vx = vx + deltavx;
            vy = vy + deltavy;
            x = x + vx*deltaT;
            y = y + vy*deltaT;
            //Only the output from every tenth iteration will be sent
            //to the spreadsheet so as to decrease the number of data points.
            if(k%10 == 0)
            {
                System.out.println(x + ", " + y + ", " + vx);
            }
            k++;
        }
    }
}

Now, here's the thing: It is a positional equation that takes input velocities, initial y distance, angle, and deltaT (how often the position is calculated)

In the robot design, the angle and initial y distance are constant, and the y distance at the goal is constant. The IV: X distance to goal. The DV: x and y velocities.

I want to make the program so that you input the x distance, and it outputs the velocities necessary.

I'm very rusty on parametric equations, and I need some help in rearranging the equations for the program... Please help if you can.

1535
Axe / Re: AXE Linking
« on: January 11, 2013, 12:55:10 pm »
Crap! I'm going to have to borrow a cable from a math teacher at my school...

1536
Computer Programming / Re: Sockets Server Side
« on: January 11, 2013, 12:44:59 pm »
What is it??? A MOBA, MMO, Online Multiplayer thingymabob?

1537
Sorry for that... I misread what you said.

1538
That's exactly my problem. I really, really wanted to get a Raspberry Pi but I didn't know why (no idea what I'd do with one) so I never did.

EDIT: pimathbrainiac, there's a $25 model.

The $25 doesn't have as many USBs doesn't have an ethernet port

Quote
Lionel : Yes, my plan is to become a pro. So far, I tried C, C++, Java, Lua, TI-8x Basic, Axe, z80 ASM and HP40g Basic.
Good :)

Quote
I don't really like the Basic languages nor Lua because they're too limited.
The BASIC languages are, indeed, limited. Their goal is ease of use, not computing power / computing efficiency. What's more, calculator BASIC implementations (and the underlying native code routines) are lackluster, be it on the TI-Z80, TI-68k, Nspire or Prizm - they're slow beyond the cost of being high-level interpreted languages, wanting to deal with multiple data types / performing simplifications, etc.
Lua isn't that limited, though. Its popularity is rising, thanks to it being an efficient interpreted language, being easy to program, and being JITable with LuaJIT (though it remains much worse than native code for heavy computation, but nobody in their right mind does such computations in languages other than, basically, C, C++ or Fortran).

Quote
My opinion for Java is more balanced because it's very similar to C++, but VM and no low level capabilities.
Yeah, but it's one of the most widely used languages. Pretty much every professional software developer has to know a bit of Java.
In this day and age, it's also important to do a bit of JavaScript, and know about the frameworks that are all the rage nowadays (Node.js, Backbone.js, etc.). Again, execution efficiency is not the utmost goal with JS; ease of coding is. With those frameworks, it's possible to build nontrivial HTML5 Web apps in a very low number of SLOC.
Another important thing, in my mind, is to spend time reading about trends and technical solutions on the Internet, and using critical thinking about them. The software engineering field is mutating, thanks to the availability of good open-source components: though it remains important to have programming knowledge, it's also important to know the strengths and weaknesses of a wide variety of solutions, and to be able to assemble ready-made pieces instead of reinventing the wheel. Large companies milking other companies, and state agencies, over custom software that is duplicated or exceeded by open source software, are going to have to change their business model ^^

Java is not JS... you know that, right?

1539
Axe / Re: AXE Linking
« on: January 11, 2013, 10:09:05 am »
Hey, For a different game, I'm doing a test for the engine with the link port.

It's not working... I think it's because I'm using the USB port, but does that actually make a difference in the code?

1540
Computer Programming / Re: Sockets Server Side
« on: January 10, 2013, 10:36:56 pm »
Hey, I already wondered this a long time: How do I handle sockets on the server? I know how to do it on the client, and I mean more a general concept, but I put it in C/C++ programming help as for specific code examples i'd be good in C++.
Thanks for any help :D

Actually, I can't help you... but on Cemetech chat earlier today, there was a discussion about using this with gCn. (there eventually was an argument about programming langs though)

1541
TI Z80 / Re: gCn + AXE = MOBA
« on: January 10, 2013, 10:34:20 pm »
rawr... I got rid of those tags...

What is the syntax, exactly, so I don't screw it up?

1542
TI Z80 / Re: gCn + AXE = MOBA
« on: January 10, 2013, 10:21:35 pm »
I've done direct linking with the engine, but I don't have two computers to test it on D:

1543
TI Z80 / Re: gCn + AXE = MOBA
« on: January 10, 2013, 09:52:26 pm »
I can help with server and serverside programming :D (If I don't lose interest)
And yeah, it looks like a huge project to me O.o
Thanks!!! I believe Cemetech actually hosts the whole gCn server, but if we can make a dedicated server, that would be awesome!!!
But IDK if we would be allowed to put our software on that server :P If we would be allowed to it would be awesome too, people wouldn't have to memorize different ips :P

Seems huge O.O

I can also help with server-side stuffs if necessary.
Even though Sorunome is a god who could probably do it all by himself :P
I'm not a god, jacobly already is >.<

My idea: how about we (you, epic7, and me) make an engine that will run on gCn in general first, then we worry about matchmaking servers.

1544
* pimathbrainiac is jealous :P

35$??? Holy Crap!!! ME GUSTA!!!

1545
TI Z80 / Re: gCn + AXE = MOBA
« on: January 10, 2013, 02:50:27 pm »
Seems huge O.O

I can also help with server-side stuffs if necessary.
Even though Sorunome is a god who could probably do it all by himself :P

Dedicated servering would require the use of gCn in a unique way, I'm thinking, so you two should both do servers. Why? Because we need to use the gCn client and *gasp* modify it to connect to a server for matchmaking...

Update: Movement engine: almost done, screenies soon
gCn understanding: greater, but still confuzzled

Edit: just noticed that I'm one post from LV6!

Pages: 1 ... 101 102 [103] 104 105 ... 125