Importing saved 3d plot

i like this post (click again to cancel)
0
i dont like this post (click again to cancel)

Hi everyone,

I generated a bunch of 3d plots to produce an animation and I saved them both as png and sobj files, because I wanted to keep the objects for later manipulations. However, when loading back an sobj file, I find them to be unusable. More precesily,

p=plot3d(lambda x1,y1: h(t0,x1,y1), (-5,5),(-5,5),plot_points=100); #t0 fixed and h(t,x,y) a procedure
p.save('bump003.sobj');
p.save('bump003.png');
a = load('bump003.sobj');
a.show();

returns the error

NotImplementedError: You must override the get_grid method.

while the png image files get correctly generated.

There is no mention of this kind of error in the Plot3D doc, except for parametric surfaces

http://www.sagemath.org/doc/reference/sage/plot/plot3d/parametric_surface.html

where it is mentioned that get_grid should indeed be overriden for subclasses of parametric_surface. Any idea why this error shows up only after importing the object ?

Many thanks, Benhuard

asked Sep 19 '10

Benhuard gravatar image Benhuard
1 1 1

2 Answers:

i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

Hi Benhuard,

This isn't an answer to your question, but I wanted to point out that @mhampton seems to have alternate ways of producing 3D animations, which maybe you could use to work around your problem. He mentioned them in his answer to my question animate 3d plots.

link

posted Sep 20 '10

niles gravatar image niles
3429 5 41 94
http://nilesjohnson.net/

updated Sep 20 '10

i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

I can confirm this with an easier example:

sage: var('x,y')

(x, y)

sage: f(x,y)=x^2+y^2

sage: p=plot3d(f,(-5,5),(-5,5))

sage: p # works fine

sage: p.save('test.sobj')

sage: q = load('test.sobj')

sage: q

NotImplementedError: You must override the get_grid method.

I will try to look into this later; it's puzzling to me, since we get

sage: type(q)

<type 'sage.plot.plot3d.parametric_surface.ParametricSurface'>

sage: type(p)

<type 'sage.plot.plot3d.parametric_surface.ParametricSurface'>

as expected.

link

posted Sep 20 '10

kcrisman gravatar image kcrisman
6784 14 67 152
This is now #9957; I don't think this will be immediate to fix. kcrisman (Sep 20 '10)

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Tags:

Stats:

Asked: Sep 19 '10

Seen: 244 times

Last updated: Sep 20 '10

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.