Re: [sage-support] Re: Snowman

2022-01-20 Thread Kwankyu


On Thursday, January 20, 2022 at 4:57:34 PM UTC+9 slelievre wrote:

> Fine with me. You should add your snow person too! 
> Then they can keep each other company:


It is fun to look at them being together. But their destiny is not 
eternity. Thanks anyway.  

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3d90f3b8-19fb-4ea9-ae8a-7e568922f5a9n%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-19 Thread Samuel Lelièvre
2022-01-20 03:49 UTC, Kwankyu:
>
> As I wish that the artwork by Samuel Lelièvre is not lost, I posted it here:
>
> https://wiki.sagemath.org/art#Snowman
>
> if the author permits. If not, let me know.

Fine with me. You should add your snow person too!
Then they can keep each other company:

sage: snowies = Graphics()
sage: snowies += P.translate(0, 0,
4).scale(2).rotateZ(-pi/5).translate(0, -4, 0)
sage: snowies += snowie.rotateZ(pi/5).translate(0, 3, 0)
sage: snowies.show(frame=False)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAEcArF2aWyZW08cA_-sUgt9i7POVnntxs5q4BH7v9op2hTq4yA%40mail.gmail.com.


Re: [sage-support] Re: Snowman

2022-01-19 Thread Kwankyu
As I wish that the artwork by Samuel Lelièvre 
 is not lost, I posted it here:

https://wiki.sagemath.org/art#Snowman

if the author permits. If not, let me know.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/f5176289-37da-45e0-a698-078c7bb8bc2fn%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-19 Thread slelievre
2022-01-17 02:39:56 UTC, Kwankyu:
>
> After blizzard is gone,
>
> from sage.plot.plot3d.shapes import *
> P = Graphics()
> P += Sphere(.5, color='white')
> P += Sphere(1, color='white').translate(0,0,-1.2)
> P += Sphere(1.5, color='white').translate(0,0,-2.5)
> P += Sphere(.1, color='white').translate(.45,-.1,.15) + Sphere(.05, 
color='black').translate(.51,-.1,.17)
> P += Sphere(.1, color='white').translate(.45, .1,.15) + Sphere(.05, 
color='black').translate(.51, .1,.17)
> P += Cone(.1,.5, color='orange').rotateX(0).rotateY(-pi/2).translate(.3, 
0, 0)
> P.show()
>
> Exercise: add arms to the snowman.

Nice one. Here's my snowie (also missing arms).

from sage.plot.plot3d.shapes import Cone, Sphere

r_bot = 3
r_mid = 2.25
r_top = 1.75

z_bot = r_bot
z_mid = z_bot + r_bot + 1/2 * r_mid
z_top = z_mid + r_mid + 1/2 * r_top

# scale factors to shrink spheres along one axis

s_body = 3/4  # vertical scale for body
s_btns = 1/4  # horizontal scale for buttons
s_eyes = 3/4  # horizontal scale for eyes

z_bot_s = s_body * z_bot
z_mid_s = s_body * z_mid
z_top_s = s_body * z_top

nose_length = 3/2*r_top

r_button = 1/4
r_nose = 1/4
r_eye = 1/8

body_color = 'white'
button_color = 'red'
eye_color = 'black'
nose_color = 'orange'

body_bot = sphere((0, 0, z_bot), r_bot, color=body_color)
body_mid = sphere((0, 0, z_mid), r_mid, color=body_color)
body_top = sphere((0, 0, z_top), r_top, color=body_color)
body = (body_bot + body_mid + body_top).scale(1, 1, s_body)

button = Sphere(r_button, color=button_color).scale(s_btns, 1, 1)
button_bot = button.translate(r_bot, 0, z_bot_s)
button_mid = button.translate(r_mid, 0, z_mid_s)
buttons = button_bot + button_mid

eye_angle = pi/10
eye = Sphere(r_eye, color=eye_color).scale(s_eyes, 1, 1)
eye = eye.translate((r_top, 0, z_top_s))
eyes = sum(eye.rotateZ(t) for t in (-eye_angle, eye_angle))

nose = Cone(r_nose, nose_length, color=nose_color)
nose = nose.rotateY(-9/8*pi/2).translate(0, 0, z_top_s)

parts = [body, buttons, eyes, nose]
snowie = sum(parts)
snowie.show(frame=False)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/8778147b-20f5-4681-ab97-e44dd80dca58n%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-16 Thread Kwankyu
After blizzard is gone,

from sage.plot.plot3d.shapes import *
P = Graphics()
P += Sphere(.5, color='white')
P += Sphere(1, color='white').translate(0,0,-1.2)
P += Sphere(1.5, color='white').translate(0,0,-2.5)
P += Sphere(.1, color='white').translate(.45,-.1,.15) + Sphere(.05, 
color='black').translate(.51,-.1,.17)
P += Sphere(.1, color='white').translate(.45, .1,.15) + Sphere(.05, 
color='black').translate(.51, .1,.17)
P += Cone(.1,.5, color='orange').rotateX(0).rotateY(-pi/2).translate(.3, 0, 
0)
P.show()

Exercise: add arms to the snowman.

On Saturday, January 15, 2022 at 5:44:08 PM UTC+9 Emmanuel Charpentier 
wrote:

> Homework ?
>
> Le vendredi 14 janvier 2022 à 19:41:05 UTC+1, iva.po...@gmail.com a 
> écrit :
>
>> Sorry, here is the picture how snowman has to look like..I started 
>> drawing with a Sphere, but I can't get it like in the picture. 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/8204afd1-f99e-4a69-9ddc-19f148cefe61n%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-15 Thread Emmanuel Charpentier
Homework ?

Le vendredi 14 janvier 2022 à 19:41:05 UTC+1, iva.po...@gmail.com a écrit :

> Sorry, here is the picture how snowman has to look like..I started drawing 
> with a Sphere, but I can't get it like in the picture. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/44c8d1b6-292d-41f2-bd7e-646e0fd9bca2n%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-14 Thread slelievre
2022-01-14, iva:
>
> Does anyone know how to draw a snowman?
> [...] picture how snowman has to look like...
> I started drawing with a Sphere, but I can't get it
> like in the picture. 

Hi Iva!  What a nice seasonal project, and a good way
to learn some Sage while making something fun!

For inspiration, see this head with eyeballs and a hat
in Sage's 3D plotting shapes documentation:

  
https://doc.sagemath.org/html/en/reference/plot3d/sage/plot/plot3d/shapes.html

Feel free to ask again if you need more help!  --Samuel

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/d435faca-9660-4bf9-a960-44d4938f7db1n%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-14 Thread Iva Polanec
Sorry, here is the picture how snowman has to look like..I started drawing
with a Sphere, but I can't get it like in the picture.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CANeRKy54Ur3d%2B6h%3DANTSswkCm8xHASgMrzMU57BqdczxYHgWXQ%40mail.gmail.com.


[sage-support] Re: Snowman

2022-01-14 Thread Nils Bruin
In a blizzard? 

P=sage.plot.graphics.Graphics()
P.show(axes=False)

In general, though, this is not a very mathematical question, nor one for 
which a computer algebra package is going to be the best tool. Perhaps if 
you give some more context, someone will be able to give you more useful 
help.

On Friday, 14 January 2022 at 08:37:38 UTC-8 iva.po...@gmail.com wrote:

> Hey!
>
> Does anyone know how to draw a snowman?
>
> Iva
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/df5e4b5d-61c1-4c07-be53-92363f3802a6n%40googlegroups.com.