From: SourceForge.net <no...@so...> - 2011-10-26 18:26:41
|
Bugs item #3151302, was opened at 2011-01-04 18:34 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3151302&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: Wrong plotting of functions based on spherical harmonics Initial Comment: Attached file is a script that shows d orbitals of hydrogen atom. In Maxima 22.1 it showed proper shape of these orbitals, in Maxima 23 (both Linux and Windows) there is apparently somethong wrong, the effects are different for sure comparing 22.1 and 23 version. The most probable reasons are: change in plot3d with spherical coordinates, change in orthopoly package or damaged interface to gnuplot. ---------------------------------------------------------------------- >Comment By: Dieter Kaiser (crategus) Date: 2011-10-26 20:26 Message: Fixed in plot.lisp revision 26.10.2011 Closing this bug report as fixed. Dieter Kaiser ---------------------------------------------------------------------- Comment By: Dieter Kaiser (crategus) Date: 2011-10-26 01:00 Message: The reported bug is in the lisp function maybe-realpart. With revision 5.23 of Maxima the option $draw_realpart has been introduced for 3D-plots. The default value of this option is NIL. Therefore, the global *plot-realpart* is set to NIL, too. The function maybe-realpart does not handle the case *plot-realpart* for a value NIL correctly. This is the function maybe-realpart: (defun maybe-realpart (x) (if *plot-realpart* ($realpart x) (if (eq 0 ($imagpart x)) x nil))) The function has two bugs. 1) It is wrong to check the value of ($imagpart x) with the function eq to be zero. 2) For the case that the imaginary part is zero, it is wrong to return the value x. x might be an expression, which has a real value. A more correct version is: (defun maybe-realpart (x) (if *plot-realpart* ($realpart x) (if (zerop1 ($imagpart x)) ($realpart x) nil))) With this version of maybe-realpart all plots of the reported examples work as expected. Dieter Kaiser ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3151302&group_id=4933 |