Author Topic: Program request. Drawing of pictures.  (Read 8581 times)

0 Members and 1 Guest are viewing this topic.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Program request. Drawing of pictures.
« on: September 26, 2010, 06:13:13 pm »
ok, this is kinda hard for me to say but,

Think of builderboy's auto optimization program.

Instead of optimizing programs, it would optimize picture variables.

For a simple example, lets say i wanted this in my game...


but i don't want the player to have to have the pic variable on their calc... what if their ram cleared or another game required the pic variable?
what if it was a simple picture that you shouldn't need to have 700 bytes or whatever taking up your calculators memory?

If you were to run a program like Builderboy's auto optimization program, except for a picture variable, it would out put a program ie. pic1-9 + pic0
such as this,  

where you could copy it into your game.



would someone be willing to write a program to do this?
« Last Edit: September 26, 2010, 06:13:42 pm by happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Program request. Drawing of pictures.
« Reply #1 on: September 26, 2010, 06:27:45 pm »
Well there are some I think. I think DJ said graphmastur had one that is an app. I recently just made one for MRide that takes a image and converts it into list compression for lines. I'll find it real quick.

Edit:
Here it is.

On another note, writing that program actually gave me the idea to create one that does something like you're saying. I might be able to do one.
« Last Edit: September 26, 2010, 06:29:49 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Program request. Drawing of pictures.
« Reply #2 on: September 26, 2010, 06:46:51 pm »
i'm confused, does that do it on calc?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Program request. Drawing of pictures.
« Reply #3 on: September 26, 2010, 07:11:07 pm »
What do you mean? Sorry, I'm confused by what you mean. It's a TI-BASIC program that takes part, or all, of the screen and converts it into line coordinates but in list compression format.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Program request. Drawing of pictures.
« Reply #4 on: September 26, 2010, 08:23:19 pm »
i could write up one for you in axe
im already making something similar for unit 533D
so let me clarify:
you want a program that can take a picvar and convert it to a compressed file (i would be using appvars, if that's alright) and another program to inserted as a subroutine that can recall whichever of those pics you want(in this case it would do so using the following syntax:
[pic#]:asm([drawing prog])

would that work for you?

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Program request. Drawing of pictures.
« Reply #5 on: September 26, 2010, 08:31:18 pm »
Well what I think he wants is a program that takes the graphscreen, or a picture variable, and puts into a new program or something  syntax that would make it as optimized as possible to just draw it manually in the program, if that makes sense.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Program request. Drawing of pictures.
« Reply #6 on: September 26, 2010, 09:22:30 pm »
Well what I think he wants is a program that takes the graphscreen, or a picture variable, and puts into a new program or something  syntax that would make it as optimized as possible to just draw it manually in the program, if that makes sense.

ya i think thats what i'm saying ^

think about builderboy's auto optimization program.  It changes a ti-basic program.
What i was thinking was, a similar program but would write a ti-basic program that would draw the picture.

my first pic. shows the pic that i want to be converted into a ti-basic program
the 2nd would be the output as a ti-basic program
the 3rd would be how the output would look in an optimized format compared to the 700 bytes of a pic variable.
« Last Edit: September 26, 2010, 09:22:41 pm by happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Program request. Drawing of pictures.
« Reply #7 on: September 26, 2010, 11:18:37 pm »
so a program that can, by simply scanning that picture above, create another program containing the 5 minimal line commands necessary to draw it? that would be very difficult indeed...

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Program request. Drawing of pictures.
« Reply #8 on: September 26, 2010, 11:32:30 pm »
i mean, i suppose it's possible. but it would be an insane program to write. the first part i think you'd have to do is scroll through every column to see if every pixel is black, and then tell the program to grab the token Vertical out of a large string, then do the same for rows... it would take an insanely long amount of time on a calculator. it would have to be an assembly or axe program, as basic would take millenia to complete. personally? i would make a computer program to brute-force it. something on-calc would be slower than if you just transferred the picture to the computer, ran a computer program on it, and then transferred the output back.


Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Program request. Drawing of pictures.
« Reply #9 on: September 27, 2010, 01:03:49 am »
I think it definitely be possible with Axe, although it would be tricky to get maximum optimization.  Especially if you want to include things such as diagonal lines.  But it could mix Horizonal and Vertical lines and Pixel Plotting commands to make a reasonable optimized program.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Program request. Drawing of pictures.
« Reply #10 on: September 27, 2010, 01:52:53 am »
Yeah I think that might be difficult indeed x.x. I worry that it might produce much larger file if using line-based pics than if you used either regular ones or used compression such as RLE.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Program request. Drawing of pictures.
« Reply #11 on: September 27, 2010, 10:35:26 am »
It could simply do horizontal lines with the line command and plx_on( command for anything only one pixle
then the user could check if the outcome was more effecient or not.
That wouldn't be too difficult right?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Program request. Drawing of pictures.
« Reply #12 on: September 27, 2010, 11:50:17 am »
Well it would be easy to tell if it was effective enough, it would just display a message like "Warning, Pic size would be less" or something.  Since it does give different functionality though, some people might want to use it anyway

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Program request. Drawing of pictures.
« Reply #13 on: September 27, 2010, 03:52:33 pm »
so do you think you could easily and quickly make program like this?
Note:  xmin, xmax, ymin,........  make a difference on where the line goes. so that will need to be preset.


Note: this would be a bigger project but,  It might be cool to have a drawing program where you can choose circle and draw it your self on the screen, and turn that into ti-basic.

Question: In axe, can you store commands into a program or something like that? or would you have to do t in asm?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Program request. Drawing of pictures.
« Reply #14 on: September 27, 2010, 04:11:46 pm »
Question: In axe, can you store commands into a program or something like that? or would you have to do t in asm?
It's possible with Asm, Axe, or Celtic III/DCS7. :)