Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Plotting > 10k random 3D points

Hi,

First of all, I am new to SAGE, and only started using it today.

I want to plot 100 000 random 3D points in SAGE, and it takes a LOT of time just to plot 10 000 points.

This is the code I have:

def random_point(): return (random(), random(), random())
l = [random_point() for k in [1 .. 10000]]
s = point3d(l, size=5)
show(s, aspect_ratio=1)

I noticed that the last two lines take incredibly long each.

Then, after the show, when I try to interact with the graphic, it is blank. I can even show the boundbox and axes, but the plot is nowhere to be seen.

If I change to [1 .. 100], everything works as intended, but this amount of points is not enough.

What should I do to accomplish effectively my goal?

I am using SAGE 8.1, installed on macOS via brew, after running notebook() on the command line and using the browser-based notebook.

Thank you!

click to hide/show revision 2
retagged

Plotting > 10k random 3D points

Hi,

First of all, I am new to SAGE, and only started using it today.

I want to plot 100 000 random 3D points in SAGE, and it takes a LOT of time just to plot 10 000 points.

This is the code I have:

def random_point(): return (random(), random(), random())
l = [random_point() for k in [1 .. 10000]]
s = point3d(l, size=5)
show(s, aspect_ratio=1)

I noticed that the last two lines take incredibly long each.

Then, after the show, when I try to interact with the graphic, it is blank. I can even show the boundbox and axes, but the plot is nowhere to be seen.

If I change to [1 .. 100], everything works as intended, but this amount of points is not enough.

What should I do to accomplish effectively my goal?

I am using SAGE 8.1, installed on macOS via brew, after running notebook() on the command line and using the browser-based notebook.

Thank you!