Author Topic: [project] Drawing to basic.  (Read 17807 times)

0 Members and 4 Guests are viewing this topic.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: [project] Drawing to basic.
« Reply #30 on: September 29, 2010, 06:52:27 pm »
Just thought of this but a nice feature with this program would be to give the option of putting the Line( command number into a compressed list or string and then put a extraction loop into the code too. Just thought that might be handy since you're going for optimization.

Edit:
Also, just a thought, but would having a separate button for points and lines be possible? That way you don't have to click twice to do a point. I just think some people may forget and put a point down, thinking its a point, and then click to make another point and BOOM, there's a line.

love the first idea, although it would be hard for me to do, since i am adding circles.  But think i will try.

Ya I' might do a point, i never really thought about it.  I figured if there were cases of just 1 point, it would prob be better as a pic var.
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: [project] Drawing to basic.
« Reply #31 on: September 29, 2010, 07:11:22 pm »
Well just because someone uses a point doesn't mean it will be just a single point. Some people just use single points to make their drawings.

As for the line thing you could make all the circle, point, and other commands first. Then when you get to the lines you can just put those all in at once. I mean instead of pointing them as Line(+#+,+#+,+#+,+# it would be {+#E6#E4#E2#+,+...

Though, I don't know how hard that is in Axe.
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: [project] Drawing to basic.
« Reply #32 on: September 29, 2010, 08:11:03 pm »
Well just because someone uses a point doesn't mean it will be just a single point. Some people just use single points to make their drawings.

Will you state that diff. plz? i don't understand.

As for the line thing you could make all the circle, point, and other commands first. Then when you get to the lines you can just put those all in at once. I mean instead of pointing them as Line(+#+,+#+,+#+,+# it would be {+#E6#E4#E2#+,+...

Though, I don't know how hard that is in Axe.

The problem is that it writes to the program as the user makes the picture.

Although i might be able to just have ....wait....

This is probably going to be what i have created when clear is pressed.

for( Z,1,Dim(L1
Line( L1(Z), L1(Z+1), L1(Z+2), L1(Z+3)
Z+1->Z
end.

I should be able to store the code before it is copied to {Str1+Z} before it is all created.


EDIT: it would only save a couple of bytes...^

EDIT: maybe I will have them all done like that, not stored to a prog till the end.
« Last Edit: September 29, 2010, 08:45:53 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 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: [project] Drawing to basic.
« Reply #33 on: September 29, 2010, 08:11:56 pm »
Actually, compression like that would be very easy in Axe, as TI's floating point format has each number as a hex character, so the number 1243 would look like 00h 83h 00h 00h 00h 00h 00h 00h 00h 12h 43h.  The 00 out front determines if it's real/complex and negative/positive.  The 83 means 1.243 * 10 to the 3rd power.
Please note that negative numbers have 80h as the first byte. :)
Also note that these numbers are all in hex. ;D

Edit: ninja'd ^-^
« Last Edit: September 29, 2010, 08:12:33 pm by ztrumpet »

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [project] Drawing to basic.
« Reply #34 on: September 29, 2010, 08:29:09 pm »
Ok, let me see if I can rephrase what I said. Some people, like me and I'm sure some spriters and such, go pixel-by-pixel when created images and such for the calculator because we control exactly where things are. Using lines can be unpredictable. So having a point button would be handy. However, just because a point is being drawn doesn't mean the end result won't end up in a line or something. Make more 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: [project] Drawing to basic.
« Reply #35 on: September 29, 2010, 08:44:23 pm »
Ok, let me see if I can rephrase what I said. Some people, like me and I'm sure some spriters and such, go pixel-by-pixel when created images and such for the calculator because we control exactly where things are. Using lines can be unpredictable. So having a point button would be handy. However, just because a point is being drawn doesn't mean the end result won't end up in a line or something. Make more sense?

I don't think i would be able o implement that in though.  I am open to suggestions though.

Next project i will be working on will be a pic variable scanner.  And see if i can optimize it by finding patterns :D

Edited my last post....


Actually, compression like that would be very easy in Axe, as TI's floating point format has each number as a hex character, so the number 1243 would look like 00h 83h 00h 00h 00h 00h 00h 00h 00h 12h 43h.  The 00 out front determines if it's real/complex and negative/positive.  The 83 means 1.243 * 10 to the 3rd power.
Please note that negative numbers have 80h as the first byte. :)
Also note that these numbers are all in hex. ;D

Edit: ninja'd ^-^

I though decimal points would be required to make the circles.  Distance formula....
but i figure that i can force the user only to chose the 2nd point only (left or right) or (above or below) the original point
« Last Edit: September 29, 2010, 08:49:22 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: [project] Drawing to basic.
« Reply #36 on: September 29, 2010, 08:50:03 pm »
Well if you can't do that then you need to make sure to say that you have to push twice to make a single point.
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: [project] Drawing to basic.
« Reply #37 on: September 29, 2010, 09:19:05 pm »
Well if you can't do that then you need to make sure to say that you have to push twice to make a single point.

oh I can defiantly do a single point. that will be easy.
just not have a random single pixel that can be used for something else later.
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: [project] Drawing to basic.
« Reply #38 on: September 29, 2010, 09:21:16 pm »
Ah. Well by single point I just mean put a point down, regardless of where it is and what it might become.
Spoiler For Spoiler:



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

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: [project] Drawing to basic.
« Reply #39 on: September 29, 2010, 11:21:59 pm »
TROLL.

J/k.

Pretty good, nice job. Hope you can fix those bugs...

EDIT: IMO you should go for the faster option. It's going to be used inside TI-BASIC programs, anyway.

Well you have to remember it's only a fraction of a second faster.

Yeah, but in games if you call it often enough even a fraction of a second make a huge difference ;)

But when do you need to constantly change the window? I don't think I've ever seen that before.

Hmm, could it potentially keep the window the same, if you let the user input the graph coordinates he'll be using? It might be hard at first to get Axe to accurately calculate the numbers to use for each line, but theoretically it's possible. If it is, it would be extremely useful.




Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [project] Drawing to basic.
« Reply #40 on: September 29, 2010, 11:23:52 pm »
Ya, I've been thinking of ways to convert the graph screen into drawing commands in TI-BASIC but I couldn't think of the math to correctly do it, though I didn't try to hard.
Spoiler For Spoiler:



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

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: [project] Drawing to basic.
« Reply #41 on: September 29, 2010, 11:24:14 pm »
Gonna try this soon :)

Good luck on this! :)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: [project] Drawing to basic.
« Reply #42 on: September 29, 2010, 11:25:24 pm »
Ya, I've been thinking of ways to convert the graph screen into drawing commands in TI-BASIC but I couldn't think of the math to correctly do it, though I didn't try to hard.

Isn't this what the project does, anyway, though? Maybe just write a more general routine to find the numbers, and it could work.

Floating points might be hard to work with, though :P




Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [project] Drawing to basic.
« Reply #43 on: September 29, 2010, 11:37:55 pm »
Well what his is doing is you draw your picture and then the output is the program. What I will, if I decide to do it, will be to just take what is on the graphscreen and will convert it into optimized drawing routines, hopefully, that is stored into Str1 and then all you have to do is recall that into a program and delete the quotes. The problem with TI-BASIC is that the window would have to be:

Xmin: 0
Xmax: 94
Ymin: -62
Ymax: 0

That is unless I figure out a way to convert the graphscreen dimensions into what the user wants to window to be.
Spoiler For Spoiler:



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

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: [project] Drawing to basic.
« Reply #44 on: September 29, 2010, 11:39:44 pm »
Well what his is doing is you draw your picture and then the output is the program. What I will, if I decide to do it, will be to just take what is on the graphscreen and will convert it into optimized drawing routines, hopefully, that is stored into Str1 and then all you have to do is recall that into a program and delete the quotes. The problem with TI-BASIC is that the window would have to be:

Xmin: 0
Xmax: 94
Ymin: -62
Ymax: 0

That is unless I figure out a way to convert the graphscreen dimensions into what the user wants to window to be.

Exactly, that's my suggestion. It would be pretty hard, but if he could figure out to calculate the floating-point numbers, he could make the output programs not clear the screen every time, and it could potentially be used simply as a sprite drawer or similar subroutine.