Near and far clip plane in glowscript

2023-08-20 Thread Poul Riis via Python-list
to a solution. It would make me very, very happy! Poul Riis Denmark -- https://mail.python.org/mailman/listinfo/python-list

Re: Partitioning a list

2018-08-23 Thread Poul Riis
I find it surprisingly difficult to find information on this issue on the internet. Until now I've only found this preview of an article: https://www.jstor.org/stable/3615434?seq=1#page_scan_tab_contents Still, I can hardly believe that nobody has made some efforts to make a python algorithm to

Partitioning a list

2018-08-21 Thread Poul Riis
there but I cannot find it. For instance, numpy's array_split only lists one (trivial) split. I would be happy if someone could refer me to a general python algorithm solving the problem. Poul Riis -- https://mail.python.org/mailman/listinfo/python-list

Re: numpy not working any more

2017-08-15 Thread Poul Riis
Den tirsdag den 15. august 2017 kl. 19.19.15 UTC+2 skrev bream...@gmail.com: > On Tuesday, August 15, 2017 at 5:23:29 PM UTC+1, Poul Riis wrote: > > Den tirsdag den 15. august 2017 kl. 07.29.05 UTC+2 skrev dieter: > > > Poul Riis writes: > > > > ... > > > &

Re: numpy not working any more

2017-08-15 Thread Poul Riis
Den tirsdag den 15. august 2017 kl. 07.29.05 UTC+2 skrev dieter: > Poul Riis <prii...@gmail.com> writes: > > ... > > For some time I have been using python 3.6.0 on a windows computer. > > Suddenly, my numpy does not work any more. > > This one-liner program: &

numpy not working any more

2017-08-14 Thread Poul Riis
. Here, there was no problem with numpy but then another problem appeared: Installing mayavi apparently needs vtk but pip couldn't find an acceptable vtk version. What is the easiest way to make things work again? Poul Riis Traceback (most recent call last): File "C:\Users\pr\Ap

repeat until keypressed

2017-05-29 Thread Poul Riis
the way I want. In the following example I just want to replace 'waitforbuttonpress' with something like 'continueuntilbuttonpress' if such a command exists. It could be a mouseclick or a keystroke from the terminal, for instance 'shift', 'space' or some character. Poul Riis import

Re: Making stl files with python for 3d printing

2016-11-15 Thread Poul Riis
Den mandag den 14. november 2016 kl. 05.55.20 UTC+1 skrev Gregory Ewing: > Poul Riis wrote: > > However, when sending the .stl file produced to a 3D-printer the vase comes > > out as a filled solid - no room for water and flowers! > > My guess is that you have a problem

Making stl files with python for 3d printing

2016-11-13 Thread Poul Riis
he writing of the .stl file. Poul Riis #!/usr/bin/env python #coding:utf-8 # Purpose: Export 3D objects, build of faces with 3 or 4 vertices, as ASCII or Binary STL file. # License: MIT License import struct from tvtk.api import tvtk from mayavi import mlab from math import * from sy

Re: pystl

2016-08-17 Thread Poul Riis
pystl\pystl.py", line 75, in write_stl_header self.f.write(struct.pack("80s", header_str)) struct.error: argument for 's' must be a bytes object Poul Riis Den onsdag den 17. august 2016 kl. 08.49.29 UTC+2 skrev Steven D'Aprano: > On Wednesday 17 August 2016 16:36, Poul Riis

pystl

2016-08-17 Thread Poul Riis
'import'-statement I try I cannot make it work. I have installed the module and a program containing only the following line from pystl import PySTL runs without any error message. Poul Riis -- https://mail.python.org/mailman/listinfo/python-list

Animations with mayavi and moviepy

2016-05-11 Thread Poul Riis
and still not found out how to do it. I guess that it is very simple but how? The program prints out some rather uninteresting information - how can I suppress that? Poul Riis import numpy as np import mayavi.mlab as mlab import moviepy.editor as mpy duration= 2 # duration of the animation

Re: sympy

2016-03-31 Thread Poul Riis
Den onsdag den 30. marts 2016 kl. 13.17.33 UTC+2 skrev Poul Riis: > Is it possible to transfer results from sympy to 'normal' python. > > In the case below I think my intention is clear enough but it does not work > as intended. How can it be done? > > Poul Riis > > &

Re: sympy

2016-03-31 Thread Poul Riis
Den onsdag den 30. marts 2016 kl. 17.59.49 UTC+2 skrev Steven D'Aprano: > On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: > > > What I intend to do is to let sympy find the derivative of some > > welldefined function and next define the foundation derivative as a normal > >

Re: sympy

2016-03-31 Thread Poul Riis
Den torsdag den 31. marts 2016 kl. 06.49.34 UTC+2 skrev Gregory Ewing: > Steven D'Aprano wrote: > > On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: > > > >>What I intend to do is to let sympy find the derivative of some > >>welldefined function and next define the

Re: sympy

2016-03-30 Thread Poul Riis
What I intend to do is to let sympy find the derivative of some welldefined function and next define the foundation derivative as a normal function so that I can calculate numerical values or even make a graph. -- https://mail.python.org/mailman/listinfo/python-list

sympy

2016-03-30 Thread Poul Riis
Is it possible to transfer results from sympy to 'normal' python. In the case below I think my intention is clear enough but it does not work as intended. How can it be done? Poul Riis from sympy import * x=Symbol('x') ftext=diff(1/(x**2+1),x) def f(t): return ftext.subs(x,'t') print

guiqwt

2015-05-22 Thread Poul Riis
How can I control the size of the window in the example below? Poul Riis import numpy as np from guiqwt import pyplot as plt_ x = np.arange(0,20,0.1) y = np.cos(x) plt_.figure(1) plt_.plot(x,y,'r-') plt_.show() -- https://mail.python.org/mailman/listinfo/python-list

Re: pyqtgraph window position

2015-02-14 Thread Poul Riis
. Kitching Human Being Phoenix, Arizona Thanks a lot. And how can I control the position of the secondary window in the example below? And how can I make a keyboard interrupt? Poul Riis import pyqtgraph as pg from math import * from time import * import numpy as np win = pg.GraphicsWindow

pyqtgraph window position

2015-02-13 Thread Poul Riis
I can control the size of my pyqtgraph window below with 'resize'. But how can I control the position on the screen? Poul Riis import pyqtgraph as pg w = pg.GraphicsWindow() w.resize(250,400) for i in range(4): w.addPlot(0, i) def onClick(event): but=event.button() print

Re: Cairo module

2015-02-04 Thread Poul Riis
be used to show the image? Poul Riis -- https://mail.python.org/mailman/listinfo/python-list

Cairo module

2015-02-03 Thread Poul Riis
I just tried the Cairo Python module. I ran the test file below. It works perfectly but instead of saving the resulting image as a file I want to see it displayed directly on the screen. How can I do that? Poul Riis import math import cairo WIDTH, HEIGHT = 256, 256 surface