66 bytes, 20 seconds

` ``{2,3,4→L₁ {5,6,7→L₂ startTmr→θ Repeat checkTmr(θ End For(Z,1,2000) sum(L₁ L₂ End checkTmr(θ+1`

74 bytes, 23 seconds

` ``2→A 3→B 4→C 5→D 6→E 7→F startTmr→θ Repeat checkTmr(θ End For(Z,1,2000) (AD+BE+CF End checkTmr(θ+1`

86 bytes, 17 seconds

` ``2→ℕ 3→I% 4→PV 5→PMT 6→FV 7→P/Y startTmr→θ Repeat checkTmr(θ End For(Z,1,2000) (ℕPMT+I%FV+PVP/Y End checkTmr(θ+1`

You should use finance variables for the variables you use the most, and normal for the rest, and maybe put them into a list when exiting the program. ]]>

It seems that {sum{1, 2, 3, … does not work, but {sum(L₁… does, maybe it sees a list within a list and gives up

The idea was to use as few variables as possible so that other programs will have them available, thus all my constants got put into ∟P3D.

The first 8 variables are camera settings, then the program computes the rest of the list

- image x
- image y
- image z
- view x
- view y
- view z
- fov (smaller is wider, 0 is orthographic)
- zoom
- camera x
- camera y
- camera z
- vector perpendicular to the image plane i
- vector perpendicular to the image plane j
- vector perpendicular to the image plane k
- top right corner of the screen x
- top right corner of the screen y
- top right corner of the screen z
- vector from top right to top left i
- vector from top right to top left j
- vector from top right to top left k
- vector from top right to bottom right i
- vector from top right to bottom right j
- vector from top right to bottom right k
- x scale factor
- y scale factor
- x shift (used for orthographic)
- y shift (used for orthographic)

I suppose multiple named list could be used in the future, but that's kinda annoying for the user

L₁ is the point being converted, {x,y,z} at the start and {x,y} at the end, and currently the client program requires it to be stored into L₁, but I suppose that's flexible. The program only needs to return the converted point

Overall I decided that this is an easy to understand way to solve the problem, but I think I there might be a more effective way

]]>` ``∟P3D= {x1,y1,z1,?,?,?,boolean,?,x2,y2,z2,x3,y3,z3,x4,y4,z4,x5,y5,z5,x6,y6,z6,scale1,scale2,transl1,transl2}`

You may be able to get a speedup if you used one of the following (I'm not sure which one is appropriate):

- a three-row matrix
- three real lists
- a real list and a complex list
- six or seven lists of three elements each

to store your data. What do each of the points represent, and is the output the (x,y) value of the projection of your point to display on the graph?

Additionally, I'm confused about L1. Why does it have dimension 3 at the start and dimension 2 at the end? Do you need a result in L1, or can it be in Ans? Do you need any side effects from this routine (is there something it needs to do other than return a value in L1)?

Mostly for my purposes, I replaced ∟P3D with L₃ in the code below. I made only trivial optimizations, and I assume that you only need the result in Ans, not L1. Don't replace your routine with this until I better understand what's going on.

` ``L₁ If L₃(7 Then {L₃(9),L₃(10),L₃(11)}-Ans→L₂ {L₃(12),L₃(13),L₃(14 L₁+L₂sum(({L₃(1),L₃(2),L₃(3)}-L₁)Ans)/sum(AnsL₂){L₃(15),L₃(16),L₃(17 End {L₃(24)sum(Ans{L₃(18),L₃(19),L₃(20)}),L₃(25)sum(Ans{L₃(21),L₃(22),L₃(23 If not(L₃(7 Ans+{L₃(26),L₃(27`

` ``If ∟P3D(7 Then {∟P3D(12),∟P3D(13),∟P3D(14→L₂ {∟P3D(9),∟P3D(10),∟P3D(11)}-L₁ L₁+Anssum(({∟P3D(1),∟P3D(2),∟P3D(3)}-L₁)L₂)/sum(AnsL₂){∟P3D(15),∟P3D(16),∟P3D(17→L₂ Else L₁→L₂ End ∟P3D(24)sum(Ans{∟P3D(18),∟P3D(19),∟P3D(20→L₁(1 ∟P3D(25)sum(L₂{∟P3D(21),∟P3D(22),∟P3D(23→L₁(2 2→dim(L₁ If ∟P3D(7 Return L₁+{∟P3D(26),∟P3D(27→L₁`

As the overall project is still unfinished I probably wont be releasing the source code until it's done and I'm happy with it. But feel free to ask any questions you may have.

]]>EDIT: nevermind, i see it now :)

]]>There are 100 points, its calculating the graph and converting it from 3d to 2d as it draws the first set of lines.

The program is also capable of drawing equations in the form of x(u,v)=… , y(u,v)=… , z(u,v)=…

For z(x,y)=-1/√(x²+y²) I used x(u,v)=u , y(u,v)=v , and z(u,v)=-1/√(u²+v²) in the program

If you want a line, you just ignore v

You can set the Umin, Umax, Usteps, Vmin, Vmax, and Vsteps for graphing

You can set the camera position, the position the camera is pointing at, zoom, pan, and fov

It is capable of both orthographic and perspective drawing, orthographic is noticeably faster

The graphing program is separate from the conversion program so its basically a 3D engine that can be used by other programs

]]>Also my program uses maths that I came up with myself, I'm working a new version with less maths, it should be much faster.

Are you good with math? Programming is easy, the math is a bit challenging.

]]>Btw, I think you might enjoy looking at <this>

P.S. You're fine, that's pretty much the same thing I did when I was a newbie here ;)

]]>I was wondering if I could get any help with coding a 3D model viewer in TI-Basic. The idea I am thinking of is a basic "orbiting" camera tool that would allow one to view a 360 view of a pre-programmed model (maybe once the code is in place for viewing the model, a program to easily create models could be developed). Due to my lack of experience and complete understanding of advanced TI-Basic programming, I require a "teacher" of sorts to explain to me the advanced coding that would need to be used for this project. If you can help, just post below.

Thank you,

-Will

P.S. Sorry for spamming the forum, I am only trying to be a contributing and active member (esp. as a new member of this community).

]]>