Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. GEO-CALC => Your Projects
United-TI Archives -> GEO-CALC
 
    » Goto page 1, 2, 3, 4, 5  Next
» View previous topic :: View next topic  
Author Message
Ductapemaster


Newbie


Joined: 12 Sep 2005
Posts: 41

Posted: 12 Sep 2005 10:25:04 pm    Post subject:

This is my second program (in TI-Basic), so I need some suggestions here. I'm creating a geometry calculator that includes tons of functions: regular polygon area, apothem calc. radius of a circle by circumference and area, circumference by radius and area, area by radius and circumference, volume and surface area of a cube, rectangular solid, cone sphere, and pyramid, interior angle sum and individual angles, same with exterior angles, pythagorean theorem, law of sines/cosines, geometric mean triangle side solver, and geometric mean calculator. If you have any more suggestions on content please let me know. So far I have a program for all of the angle calculations and the area of regular polygons (the formula came ut of the TI-83+ manual...just using my resources :biggrin: ) I need to know, should I use multiple programs to do all of the functions, of should it be one big program? I have most of the menu's set up, thats the easy part...so far it looks good, but doesnt do very much, so I help and suggestions. I know the language pretty well, but as I said b4 this is my second program. BTW im getting the TI connect USB cable soon, but it has to make its way from Florida to California first... I'll post the programs I have so far when I get a chance, including my first program, a quadratic formula solver/grapher. Thaks in advace and sorry for the huge post... Neutral
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 12 Sep 2005 10:36:43 pm    Post subject:

Hey, Ductapemaster. Welcome to the forum. (Red Green Show fan?)

Well, I only did a little 82 BASIC. I think the BASIC guys here would vote for one big program. It might be a speed & size issue. One of the experts here might give more details...


Last edited by Guest on 12 Sep 2005 10:37:23 pm; edited 1 time in total
Back to top
Ductapemaster


Newbie


Joined: 12 Sep 2005
Posts: 41

Posted: 12 Sep 2005 10:52:47 pm    Post subject:

Hey thanks! And yes I am a fan. The name comes from my actual love of duct tape...you can do anything with it, except program in TI-Basic...lol
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 12 Sep 2005 11:02:23 pm    Post subject:

Yeah Red Green is the greatest! Except the PBS timeslot flips around faster than a gecko on a hotplate. They need to choose a time and keep it! Cool

Anyway, do you have a TI emulator?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 12 Sep 2005 11:04:23 pm    Post subject:

Geometry Solutions—This page is an excellent source, and perfect for putting your formulas to the test.

Perhaps you could provide a section on definitions. If that sounds good, here's a basic list to get you started:

  • Line
  • Line Segment
  • Ray
  • Angle
  • Acute Angle
  • Obtuse Angle
  • 1° Degree
  • Right Angle (90°)
  • Straight (180°)
  • Complete (360°)
  • Scalene Triangle
  • Right Triangle
  • Isosceles Triangle
  • Equilateral Triangle
  • Circle
  • Ellipse
  • Arc
  • Semicircle
  • Radius
  • Diameter
  • Square
  • Rhombus
  • Rectangle
  • Parallelogram
  • Trapezoid
  • Quadrilateral
  • Pentagon
  • Pentagram
  • Hexagon
  • Octagon
  • Triangular Pyramid
  • Square Pyramid
  • Rectangular Pyramid
  • Triangular Prism
  • Rectangular Prism
  • Cube
  • Cylinder
  • Cone
  • Sphere
  • Ellipsoid
Calling subroutines to do the dirty work would certainly be helpful for the programmer, but the additional programs might be a hassle for those who end up using them. Size is a small factor because the extra bytes used to call the programs could simply be replaced by the corresponding blocks of code. In the case of subroutines, speed is still subjective as it relies entirely on the ability of the programmer.

If you have questions in the future, please don't hesitate to ask them.
Back to top
Jeremiah Walgren
General Operations Director


Know-It-All


Joined: 24 May 2003
Posts: 1937

Posted: 13 Sep 2005 12:49:43 am    Post subject:

I think several smaller programs carry the advantage of only loading the ones that you'll need so that you don't have to carry around this enormous program in your memory. I'd like the options more, personally.

Then again, it does create the hassle of finding which ones you want and stuff. Perhaps a version with both? Smaller programs and one big one?
Back to top
leofox
INF student


Super Elite (Last Title)


Joined: 11 Apr 2004
Posts: 3562

Posted: 13 Sep 2005 06:36:41 am    Post subject:

those formula programs won't be that big, so i'd say in one program. But just remember that goto's and labels are slower if the program is bigger.
Back to top
Ductapemaster


Newbie


Joined: 12 Sep 2005
Posts: 41

Posted: 13 Sep 2005 06:12:35 pm    Post subject:

So far, I have a welcome screen, main menu (2d figures, 3d figures, angles, quit), under 2d fig. I have regular polygon area( not written out...), apothem, perimeter, circles, main, and quit. Circles has cirumference, area and radius and plans to be able to calculatr any one of those from either of the other two (ex: area from either circumference or radius). I don't have menus for 3d yet, but angles has interior and external angles, which will so be combined. I have calculator programs for area of regular N sided polygons, interior and exterior angles, and the quadratic formula solver/grapher (separate program). Ill post the programs next... Oh and how do you limit a number by decimal places? the many numbers after the decimal keep overwriting characters in this and other programs...

Last edited by Guest on 13 Sep 2005 06:16:57 pm; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 13 Sep 2005 06:21:28 pm    Post subject:

At the start of the program, you can use [font="courier new"]Fix # to set the calculator to display # decimals.
Another way is to [font="courier new"]round(n,#)—Round n to # decimal places.
Back to top
Ductapemaster


Newbie


Joined: 12 Sep 2005
Posts: 41

Posted: 13 Sep 2005 06:28:09 pm    Post subject:

Regular polygon area calc
:Output(4,3,"ONLY REGULAR"
:Output(5,5,"POLYGONS!"
:Pause
:ClrHome
:Disp "NUMBER OF SIDES:"
:Prompt N
:Disp "RADIUS MEASURE:"
:Prompt B
:NB2 sin(pi/N)cos(pi/N)->A
:ClrHome
:Disp "SIDES:"
:Disp "RADIUS:"
:Output(3,7,A
:Output(1,8,N
:Output(2,9,B
:Output(3,1,"AREA:" 'I do this b/c it overwrites extra numbers if they get in the way
:Pause

Any Suggestions???
Well this is only par of the code, maybe Ill do a menu program and then many small ones for the calculations...goto's make the program hard to look through for something...what do you guys think?
Back to top
Ductapemaster


Newbie


Joined: 12 Sep 2005
Posts: 41

Posted: 13 Sep 2005 06:29:38 pm    Post subject:

Wow, Supergoose, you write that while I was typing...well thanks, I'll add that and try it. Oh and thanks all of you for your help so far, but remember we have a long journey ahead...lol

==========

Ok tried the fix code and discovered (well I already knew it and forgot...) that it puts zeros ofter numbers w/o #'s after the decimal place. I would like it so it will do that only if it HAS numbers after the decimal place and if it doesnt, it just shows a whold number. I guess I'm an asthetics freak, huh?


Last edited by Guest on 13 Sep 2005 09:44:35 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 13 Sep 2005 06:37:11 pm    Post subject:

In that case, you have to use round(.
Back to top
Ductapemaster


Newbie


Joined: 12 Sep 2005
Posts: 41

Posted: 13 Sep 2005 06:43:54 pm    Post subject:

but how would I use it so it only rounds if it has decimal places? Wont it put zeros after numbers without decimals?
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 13 Sep 2005 06:50:21 pm    Post subject:

round( wouldn't do that. for example, round(6.1, 5 returns 6.1, not 6.1000. Turn off the fixed-point option, though.

Edit: I have no doubt you wouldn't do this, but just in case: don't round midway through calculations, only round at the end when you display the answer.


Last edited by Guest on 13 Sep 2005 06:51:15 pm; edited 1 time in total
Back to top
Ductapemaster


Newbie


Joined: 12 Sep 2005
Posts: 41

Posted: 13 Sep 2005 06:53:39 pm    Post subject:

Ha, now I understand...thanks!
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 13 Sep 2005 06:54:10 pm    Post subject:

<top secret>
You can omit trailing quotes and parentheses without consequence.
</top secret>

If you prefer, you could change...

[font="courier new"]:Disp "NUMBER OF SIDES:"
:Prompt N


...to just...

[font="courier new"]:Input "NUMBER OF SIDES?",N

For aesthetics, it would please me more to see this:

[font="courier new"]:Disp "SIDES:
:Output(1,8,N
:Disp "RADIUS:
:Output(2,9,B
:Disp "AREA:
:Output(3,7,A


But I'm more than picky. I suppose this is being handled as I write this anyhow.

Quote:
:NB2 sin(pi/N)cos(pi/N)->A
You'll have to watch out when posting code here—The caret disappeared! 8)

Quote:
Turn off the fixed-point option, though.
[font="courier new"]Float accomplishes this.

When in doubt, experiment to your heart's content. Smile

Last edited by Guest on 13 Sep 2005 06:57:39 pm; edited 1 time in total
Back to top
Ductapemaster


Newbie


Joined: 12 Sep 2005
Posts: 41

Posted: 13 Sep 2005 07:01:24 pm    Post subject:

hmmm, I tried it and it doesnt seem to work. Under mode, the float option is selected and I have the radius and area rounded:
round(B,2 'Radius
round(A,2 'Area
But the area still has like 6 decimal places...
Help...

Edit: I posted this after supergoose...but ill do what you said. Oh and sorry about the spelling Laughing


Last edited by Guest on 13 Sep 2005 07:04:11 pm; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 13 Sep 2005 07:06:15 pm    Post subject:

The [font="courier new"]round( only returns a calculation without updating the variable.

Quote:
don't round midway through calculations, only round at the end when you display the answer.
Here, Sir Robin suggests that you try something like this: [font="courier new"]Output(3,7,round(A,2

Last edited by Guest on 13 Sep 2005 07:12:27 pm; edited 1 time in total
Back to top
Ductapemaster


Newbie


Joined: 12 Sep 2005
Posts: 41

Posted: 13 Sep 2005 07:08:42 pm    Post subject:

ohhhhh, got it...also, I made the changes you suggested. I'm really starting to like the input command...

Edit: It works!!!


Last edited by Guest on 13 Sep 2005 07:11:23 pm; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 13 Sep 2005 07:15:40 pm    Post subject:

A word of caution: I know this is fast-paced, but double- (and triple-) posting is disallowed. Under reasonable circumstances, this is not a problem at first. It happens commonly when new members arrive. Just to be safe, glance over the Forum Rules and make sure nothing catches you off guard. These are general rules, so there's nothing like...

*looks around*

No 'splodie nuke avatars on Tuesday. :ninja:

Ahem. -Sir Robin


Last edited by Guest on 13 Sep 2005 07:29:01 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2, 3, 4, 5  Next
» View previous topic :: View next topic  
Page 1 of 5 » All times are GMT - 5 Hours

 

Advertisement