Author Topic: Gear Algorithm  (Read 2554 times)

0 Members and 1 Guest are viewing this topic.

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Gear Algorithm
« on: March 07, 2011, 01:18:41 am »
Can somebody help me to come up with an algorithm that can draw a convincing gear/sawblade thing that spans the entire width of the screen and rotates as it moves downwards? I have a great idea for my project but didnt have much luck figuring this out :(
Thanks in advance.
In-progress: Graviter (...)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Gear Algorithm
« Reply #1 on: March 07, 2011, 01:28:23 am »
Entire width of the screen? Could you explain a little more on how this is supposed to work. My best idea because rotating is heavily proc intensive is to just use several sprites for each stage of the rotation.

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Gear Algorithm
« Reply #2 on: March 07, 2011, 01:36:43 am »
Well, the screen isn't square, so you'd have to apply a some vector transformations, which wouldn't be fast for the number of lines presumably necessary. But you could be the gear out of sprites by having each tooth as a sprite and rotating those.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ