ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 10 Jul 2015 06:35:43 +0200Error rending 3d Scene...https://ask.sagemath.org/question/27300/error-rending-3d-scene/I have been attempting to render 3d objects and have been successful for the whole day until just recently. I am constantly getting the following error:
"error rendering 3d scene -- error downloading /blobs/836a1670-2631-40ea-87a8-a4047e9e432d.sage3d?uuid=836a1670-2631-40ea-87a8-a4047e9e432d"
Here is my code
counter3 = 0
counter2 = 0
counter1 = 0
#array for the list of points
pts = []
# Your substitution
w = WordMorphism('1->12,2->13,3->1')
# Your word you wish to apply the substitution to
toApplyOn = "1"
# Number of times to apply the substition
upTo = 4
# empty graphics object
P=Graphics()
for j in range(upTo):
word = w(toApplyOn)
toApplyOn = word
for x in word:
previousVector = v
if int(x) == 3:
counter3 += 1
if int(x) == 2:
counter2 += 1
if int(x) == 1:
counter1 += 1
v = (counter1, counter2, counter3)
pts.append(v)
if not int(x) == (len(word)-1):
if int(x) == 3:
P += line3d([v,previousVector],color='red')
if int(x) == 2:
P += line3d([v,previousVector],color='blue')
if int(x) == 1:
P += line3d([v,previousVector],color='green')
P+=point3d(pts,color='black')
P
My code is suppose to output a 3D image (a neat looking staircase).
I am using the Sage Math Cloud as my environment. Does anyone else get this error? Does anyone have ideas why I receive this error?Fri, 10 Jul 2015 01:48:13 +0200https://ask.sagemath.org/question/27300/error-rending-3d-scene/Comment by fidbc for <p>I have been attempting to render 3d objects and have been successful for the whole day until just recently. I am constantly getting the following error: </p>
<p>"error rendering 3d scene -- error downloading /blobs/836a1670-2631-40ea-87a8-a4047e9e432d.sage3d?uuid=836a1670-2631-40ea-87a8-a4047e9e432d" </p>
<p>Here is my code</p>
<pre><code>counter3 = 0
counter2 = 0
counter1 = 0
#array for the list of points
pts = []
# Your substitution
w = WordMorphism('1->12,2->13,3->1')
# Your word you wish to apply the substitution to
toApplyOn = "1"
# Number of times to apply the substition
upTo = 4
# empty graphics object
P=Graphics()
for j in range(upTo):
word = w(toApplyOn)
toApplyOn = word
for x in word:
previousVector = v
if int(x) == 3:
counter3 += 1
if int(x) == 2:
counter2 += 1
if int(x) == 1:
counter1 += 1
v = (counter1, counter2, counter3)
pts.append(v)
if not int(x) == (len(word)-1):
if int(x) == 3:
P += line3d([v,previousVector],color='red')
if int(x) == 2:
P += line3d([v,previousVector],color='blue')
if int(x) == 1:
P += line3d([v,previousVector],color='green')
P+=point3d(pts,color='black')
P
</code></pre>
<p>My code is suppose to output a 3D image (a neat looking staircase).</p>
<p>I am using the Sage Math Cloud as my environment. Does anyone else get this error? Does anyone have ideas why I receive this error?</p>
https://ask.sagemath.org/question/27300/error-rending-3d-scene/?comment=27301#post-id-27301Your code works for me, just had to define `v` before the `for` loop.Fri, 10 Jul 2015 02:20:01 +0200https://ask.sagemath.org/question/27300/error-rending-3d-scene/?comment=27301#post-id-27301Comment by OzeraAlt for <p>I have been attempting to render 3d objects and have been successful for the whole day until just recently. I am constantly getting the following error: </p>
<p>"error rendering 3d scene -- error downloading /blobs/836a1670-2631-40ea-87a8-a4047e9e432d.sage3d?uuid=836a1670-2631-40ea-87a8-a4047e9e432d" </p>
<p>Here is my code</p>
<pre><code>counter3 = 0
counter2 = 0
counter1 = 0
#array for the list of points
pts = []
# Your substitution
w = WordMorphism('1->12,2->13,3->1')
# Your word you wish to apply the substitution to
toApplyOn = "1"
# Number of times to apply the substition
upTo = 4
# empty graphics object
P=Graphics()
for j in range(upTo):
word = w(toApplyOn)
toApplyOn = word
for x in word:
previousVector = v
if int(x) == 3:
counter3 += 1
if int(x) == 2:
counter2 += 1
if int(x) == 1:
counter1 += 1
v = (counter1, counter2, counter3)
pts.append(v)
if not int(x) == (len(word)-1):
if int(x) == 3:
P += line3d([v,previousVector],color='red')
if int(x) == 2:
P += line3d([v,previousVector],color='blue')
if int(x) == 1:
P += line3d([v,previousVector],color='green')
P+=point3d(pts,color='black')
P
</code></pre>
<p>My code is suppose to output a 3D image (a neat looking staircase).</p>
<p>I am using the Sage Math Cloud as my environment. Does anyone else get this error? Does anyone have ideas why I receive this error?</p>
https://ask.sagemath.org/question/27300/error-rending-3d-scene/?comment=27302#post-id-27302@fidbc Ah, hm, I guess it works now. How strange! I sort of changed how your code worked, fidbc, but it definitely helped! Thank you so much. I do have a question though; is there a way to get rid of the bounding box?Fri, 10 Jul 2015 04:50:02 +0200https://ask.sagemath.org/question/27300/error-rending-3d-scene/?comment=27302#post-id-27302Comment by fidbc for <p>I have been attempting to render 3d objects and have been successful for the whole day until just recently. I am constantly getting the following error: </p>
<p>"error rendering 3d scene -- error downloading /blobs/836a1670-2631-40ea-87a8-a4047e9e432d.sage3d?uuid=836a1670-2631-40ea-87a8-a4047e9e432d" </p>
<p>Here is my code</p>
<pre><code>counter3 = 0
counter2 = 0
counter1 = 0
#array for the list of points
pts = []
# Your substitution
w = WordMorphism('1->12,2->13,3->1')
# Your word you wish to apply the substitution to
toApplyOn = "1"
# Number of times to apply the substition
upTo = 4
# empty graphics object
P=Graphics()
for j in range(upTo):
word = w(toApplyOn)
toApplyOn = word
for x in word:
previousVector = v
if int(x) == 3:
counter3 += 1
if int(x) == 2:
counter2 += 1
if int(x) == 1:
counter1 += 1
v = (counter1, counter2, counter3)
pts.append(v)
if not int(x) == (len(word)-1):
if int(x) == 3:
P += line3d([v,previousVector],color='red')
if int(x) == 2:
P += line3d([v,previousVector],color='blue')
if int(x) == 1:
P += line3d([v,previousVector],color='green')
P+=point3d(pts,color='black')
P
</code></pre>
<p>My code is suppose to output a 3D image (a neat looking staircase).</p>
<p>I am using the Sage Math Cloud as my environment. Does anyone else get this error? Does anyone have ideas why I receive this error?</p>
https://ask.sagemath.org/question/27300/error-rending-3d-scene/?comment=27303#post-id-27303@OzeraAlt: If you are in the cloud, then `show(P,frame=False)` should work.Fri, 10 Jul 2015 06:35:43 +0200https://ask.sagemath.org/question/27300/error-rending-3d-scene/?comment=27303#post-id-27303