Import svg to nodebox3/1/2023 VideoClip ( make_frame, duration = D ) clip. translate (( x, ground + r / 2 ))) shadow. circle ( r = ( 1 - coef / 4 ), fill = shadow_gradient ). ColorGradient ( type = "radial", stops_colors =, xy1 =, xy2 =, x圓 = ) shadow = ( gz. Surface ( W, H, bg_color = ( 1, 1, 1 )) x = ( - W / 3 ) + ( 5 * W / 3 ) * ( t / D ) y = ground - HJ * 4 * ( x % DJ ) * ( DJ - ( x % DJ )) / DJ ** 2 coef = ( HJ - y ) / HJ shadow_gradient = gz. ColorGradient ( type = "radial", stops_colors =, xy1 =, xy2 =, x圓 = ) def make_frame ( t ): surface = gz. Import numpy as np import gizeh as gz import moviepy.editor as mpy W, H = 200, 75 D = 3 r = 10 # radius of the ball DJ, HJ = 50, 35 # distance and height of the jumps ground = 0.75 * H # y-coordinate of the ground gradient = gz. The shadow is done using a circle with radial fading black gradient whose intensity diminishes when the ball is higher, for more realism (?). write_gif ( "balls.gif", fps = 15, opt = "OptimizePlus" ) ColorGradient ( type = "radial", stops_colors =, xy1 =, xy2 =, x圓 = ) ball = gz. polar2cart ( W / 5, angle ) # center of the ball gradient = gz. Surface ( W, H ) for r, color, center in zip ( radii, colors, centers ): angle = 2 * np. randint ( 0, W, ( nballs, 2 )) def make_frame ( t ): surface = gz. Import gizeh as gz import numpy as np import moviepy.editor as mpy W = H = 150 D = 2 # duration nballs = 60 # generate random values of radius, color, center radii = np.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |