DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

3D Plot Axes

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
raydela



Joined: 10 Sep 2003
Posts: 46
Location: Oxford, MI, USA

PostPosted: Fri Apr 24, 2009 4:13 pm    Post subject: 3D Plot Axes Reply with quote

Hello.

While doing some math exercises out of a book, I got a chance to use the 3D ability of DPlot (nice to be able to do rotations with CTRL-arrow keys!)

I noticed that the axes are drawn as "far walls (3 faces) of a 1/2 cube" which are oriented such that the extent of the 3D object fits inside of the 1/2 cube. I guess I am used to visualizing the axes as LINES going off from (0,0,0) and how a 3D object relates to that (which makes it easier to see how the object is offset by additive terms in an equation, etc).

Suggestion 1: Provide option to draw the axes as the "standard" x-y-z coordinate nunber LINES (not PLANES as above) and have some designation (a fat dot or some user specifiable symbol which can optionally be turned on/off) at the point(s) where the axes intersect the 3D object.

Suggestion 2: Another error to have option of suppressing when plotting (along with divide by zero error) is the SQUARE ROOT of a NEGATIVE VALUE.

I ran into the above problem when trying to plot z = sqrt( x^2+y^2-1) -- a parabolic bowl "sitting on" the plane z = -1.

Finally, one thing I did to myself once is get carried away with having DPlot calcuate too many points (like 1 million - range of 100 with intervals of 0.1) which took a minute or two. This was not the problem itself, it was when I went to rotate the object -- WHOOPS, of course it needs to redo the entire 1 million point calculation. Since in this case I was only playing around with rotation function I did not to wait to gain control of my PC (I tried bringing up Task Manager to kill the DPlot process and even this took a while):

Suggestion 3: Allow the user the option to (instantly) abort a rotation or other plotting operation that could potentially take a long time. (If there was a plot before the operation maybe save it to temp image file should the user abort the new plot so old view could quickly be restored)

Still, love the 3D ability. Keep up the good work!

Ray Delaforce
Back to top
View user's profile Send private message Send e-mail MSN Messenger
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2311
Location: Vicksburg, Mississippi

PostPosted: Fri Apr 24, 2009 11:27 pm    Post subject: Reply with quote

Ray,
Thanks for your suggestions.

1. This one will definitely be added to the to-do list, but I can see at least a couple of problems: a) when surface isn't anywhere near X, Y, and/or Z=0, b) somebody (everybody?) will want to draw the axis labels along those lines and i) they may not fit well, since the origin may be near an edge of the surface, and ii) if the axis is hidden by the surface, should the label be hidden too? I'd think so, but hiding parts of text is a considerably crazier problem than hiding triangles and line segments.

But I will mull it over.

2. I don't see a straightforward solution. The "Prevent divide by 0 errors" setting traps div/0 (as well as a few other math errors) and increments X and/or Y by a small value and tries again. In your case (assuming your bowl is centered at X,Y=0) trying again won't help - any point inside a circle of radius 1 will result in an error. Instead you might try a conditional like sqrt(if(x^2+y^2>1,x^2+y^2-1,0)) (or instead of 0 use whatever value you want near the center).

3. Here there be dragons.

DPlot actually did this many years ago - you could press <Esc> to abort a drawing. I threw that out for a variety of reasons, and here are a few of them off the top of my head:
a) What if the plot has never been drawn? Now you're left with a blank screen and wondering how to get DPlot to draw something.
b) If the previous plot is kept then DPlot would need to restore the settings associated with that plot. That means that it would no longer be enough to know that a plot should be redrawn; DPlot would need to keep track of why it needs to be redrawn and undo that change.
c) But what if the plot was redrawn because the document window was resized?

I think a better option might be to add a setting for the maximum number of points to allow the rotation shortcuts with.

I imagine I'll wake up Saturday morning and wonder why I gave such cranky answers Friday night Smile
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2311
Location: Vicksburg, Mississippi

PostPosted: Fri Apr 24, 2009 11:55 pm    Post subject: Reply with quote

PS: You're set up to receive an e-mail notice of replies, but the e-mail address in your settings here is no good. Or at least it was no good tonight.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
raydela



Joined: 10 Sep 2003
Posts: 46
Location: Oxford, MI, USA

PostPosted: Sat Apr 25, 2009 9:39 am    Post subject: Reply with quote

OK, I updated my e-mail address. You've had my proper address for update notices so it didn't occur to me that the forum profile held a separate one.
(That shows how long since I last used this forum).

For suggestions.

1.) What about compromise of using planes x=0, y=0, and z=0 and perhaps have a plane width option that could range from 1 point wide for each plane (giving the lines) all the way to some max determined by range of surface plotted. If it makes it easier then hide text that is below the plotted surface and the user will have to extend the appropriate axis plane(s) enough it get it outside the surface to make the labels visible.
(Wow - here's an idea: What about ability to slide the axis planes around so that one could 'slice' the surface in just about anyway imaginable!)

2.) Oh - I thought this would be similar to div/0 in that you would be able to skip a particular point that would cause any problem and move on to the next.
In the example given, the radius does eventually make the sqrt value positive so long as the range of |x| and or |y| > 1. But I guess I see your point if someone defines a range that will always result in a negative value inside the sqrt function.

3.) This one is not so important. I already have somewhat of a feel for how long it take for various amounts of total points to plot.

Ray Delaforce
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group