Wednesday, January 31, 2024
Tuesday, January 30, 2024
Wondering
It's -10C again, and I'm getting ready for my daily outing. Have been
watching Youtube videos about space in the last few days. Also watched
the beginnings of Moon, a sci-fi movie about some pour soul alone on the Moon.
There is a grim aspect to the whole thing; the sky seems black all the time.
Yes, there are temperature swings because there is no atmosphere; the Moon
is a big rock. Couldn't one create an artifical daylight environment from all
the solar radiation at peek moments...
Hmmm...
Monday, January 29, 2024
Artic Quest
Russia's travails in the Artic, from the Guardian UK:
Sunday, January 28, 2024
Evolving
That would be silly! I mean a Third World War or, at least, a long
land war in Europe between Russia and its Western neighbors as
certain military leaders have suggested. With conscription looming!!
Looking at things from a bit further than current squabbles, what is happening
is the co-existence of very dangerous weapons and a global information
and exchange network. And global shopping.
I was actually surprised. Watching Travelling with Russell on Youtube, two of
the major grocery chains in Russia are respectively French and German. The very
largest is German. Meanwhile, Germany is sending arms to Ukraine. Totally
schizo. And you can buy an iphone15 easily enough, thanks to Vietnamese and Indian
middlemen.
Russia has great shopping malls. Americans have moved on to Big Box stores like
Walmart and Costco they can just drive up to, but the climate keeps Malls attractive
in Russia... and Canada, as well.
I myself have been spending my days trying to master Synfig (developed in German)
from a team of Russian animators who were the only ones clever enough to use it.
(It is computerized rather than hand-drawn animation, and requires a lot of math).And I
often look scientific things up inWikipedia in translation from the Russian because it is
always to the point.
So when a disagreement emerges for Russia, their nuclear weapons are the elephant
in the room and they feel obliged to stand on it. Are they threatening us with them.
Yes and no, the weapons are there.
As for regime change in Russia, they have evolved from from pur et dur communism.
Maybe the kind of triple entendre about democratic values we live with looks really
weird in translation. On a day-to-day basis, President Putin seems out and about talking to
schoolchildren and attending various openings and commemorations. Not really the
stuff of dictatorial nightmares...
Saturday, January 27, 2024
Teddy
Wearing my new Teddy Jacket, this morning. It is meant for home comfort. The
temperature in my app is set at 22C all winter, but on cold days there are drafts.
This jacket takes care of that.
And yes, it makes me look like a Peanut Butter Bear๐
Below, Chat/Bing on the matter:
Friday, January 26, 2024
Progress
Thursday, January 25, 2024
Counting!!
Been working on synfig a bit more. The challenge this time is to make
the character walk in place. Below, an illustration of the procedure using
a circle that turns from blue to red repeatedly. working within animation mode.
Set the initial Keyframe at blue:
Cake Moment
From the point of view of seasonal rotation, today is a good candidate
for worse day od the year: middle of winter, cold, damp, grey and dangerous.
Are we letting this get to us; there are little comforts available. One such showed
up on my Facebook feed, this morning. A simple but certainly comforting
recipe for Semolina Cake. Translating for you:
That's 1 cup of Semolina, 1 liter of milk, 1/2 cup of sugar, 2 eggs, 1/3 cup
raisins, pinch of salt.
Get the milk and sugar to boiling on the stove top. Make it rain Semolina and cook for
5 minutes while stirring.
Away from the heat, incorporate the beaten eggs and raisins.
Pour into a buttered cake mold.
Cook at 350F for 30 minutes.
Wait for it to cool before enjoying.
I calculated the calorie count at app. 1600, that's 270 for 1/6th of the cake, using 2%
milk...๐
* * *
Wanted to leave the house this morning, but it is impossible. There is a thin
sheet of ice on everything; and for the roads and sidewalks, that is on top of
frozen over slush. Maybe this afternoon if we manage to get over the freezing
point...
source: MรฉtรฉMรฉdia
* * *
It's Pygame Thursday. Player needs to hit the red to score; if he/she hits blue, he looses
a life. For the moment, only 1 red appears. Later refinemets should change one of the
blues into a red afyter a score... It's a dangerous game: I got the Red but lost one Life
doing it!!
Wednesday, January 24, 2024
Odd
Having reached a respectable old age as a Canadian, there
is one thing I assume to have solved for myself, and that is: how
to dress for the weather. Well, yesterday proved me wrong!
I wore my standard walking in the snow attire, warm hat, coat with
a hood and heavy scarf, knee-high slush boots, warmest gloves, good
eyeglasses and headed for the Walmart Center by the truckers' route,
to avoid all the car traffic. It's more open air but we are alledgedly in a
warm phase with above zero highs. I hadn't checked the wind chill numbers
(-8C).
It was my hands. The rest of me was toasty but my hands were getting colder
and colder. Having reached Walmart, I knew I couldn't go back home without
doing something. I ended up scouring Walmart's for thin women's gloves that
I could wear underneath my heavy ones, like how we dress as children. I
shopped less but - force majeure oblige - did enjoy a Moka cafe at the indoors
McDonalds. It was incredibly delicious...
There was another unexpected outcome: my hands were, of late, starting to show
expanding age spots that were purple-colored. At bath time last night, these were
back to a pristine even-colored white, and are still that way this morning. Odd!!
Tuesday, January 23, 2024
Smooth2
Here is Bard's take on Synfig keyframes and waypoints:
In Synfig, the terms "keyframes" and "waypoints" are often used interchangeably, but there are some subtle differences between them. Here's a breakdown:
Keyframes:
Markers: They act as markers on the timeline, defining specific points in time where the properties of an object (position, rotation, opacity, etc.) are explicitly defined.
Starting points: They typically define the beginning and end states of an animation, acting as anchor points for interpolation.
Trigger points: They can trigger events or changes in behavior within the animation.
Controllable transitions: You can control the transition between keyframes, specifying whether it's linear, ease-in/out, or something else.
Waypoints:
Intermediate points: They are additional points within a keyframe interval that define how the object's properties change between the keyframes.
Smoother animation: They allow for smoother and more nuanced animation by specifying intermediate states.
Fine-tuning control: You can add and adjust waypoints within a keyframe to fine-tune the animation curve.
Automatic generation: In some cases, Synfig automatically generates waypoints based on changes made to object properties.
In essence:
Keyframes define the major turning points of the animation.
Waypoints refine the journey between those turning points.
Here's an analogy: Imagine driving from point A to point B. Keyframes would be like setting your GPS destinations at A and B, while waypoints would be like picking specific landmarks along the way to guide your route.
Here are some additional resources that might be helpful:
Synfig User Manual: https://wiki.synfig.org/
Synfig for Beginners: Keyframes and Waypoints Explained: https://youtu.be/tAwbC7dPcgs?si=oFbtv-zObPNUwnZn
Synfig- Keyframes or Waypoints? Answered: You should add a 10% waypoint for @keyframes wave - HTML-CSS - The freeCodeCamp Forum
I hope this clarifies the difference between keyframes and waypoints in Synfig!
Monday, January 22, 2024
Smooth
So things reached a crisis point for me with Synfig today, with
dangling feet and the character moving backwards. My best efforts were
going into being super precise about creating keyframes, but this just wasn't
working. With a little help from ChatGPT, finally came to see how this
whole thing connects.
Keyframes are not the endall, they are merely important wayframes I want to
keep track of. Wayframes ARE important. Whenever I am in animation mode
and play with the shape, a wayframe is created which stores the new parameters
I have selected. Running the timeline, I can see - at any point - how the program
has created inbetween values toward these. If I want to 'see' the wayframe icons,
I go to the object layer and the pertinent values will be in the properties panel...
Below, I have created a start and end position for the ball with keyfranes,
And then, I just decided to lift the ball in the air at a moment inbetween.
Playing the animation, it will create and arc to accomodate all my instructions...
Blur
My Synfig walk cycle is not yet to my liking, but I peeked ahead to Lesson 9
to see what happens next. Turns out, there is grounds for feeling better about it all.
Synfig has provisions for filter layers, instructions that only affect layers underneath
or in the same group. And one of these is a Time Loop. If I can only get a 31 frame
cycle that I like, the loop can repeat endlessly, and the character stays at the same place
on the canvas...
Sunday, January 21, 2024
Tasty
The Bears take it! I bought the new Kraft Barista coffee yesterday - chocolate and
hazelnut - and it delivers. Nice little taste and a warm aroma. Was somewhat intimidated
by the packaging at first, but it's actually rather clever. One presses along the dotted
line and the cover lifts. There is then a foil and carton seal to remove... Later,
close it back.
Saturday, January 20, 2024
Useful(2)
Just starting to see all the options on Synfig. Below, using the circle
tool as advanced outline alone, I can change the shape of the circle and the thickness
of the outline wherever I want.
Below, using advanced outline and region together. The outline part has many
possibilities; while the shape is controlled by the handles I choose from the handles list.
Friday, January 19, 2024
Useful Synfig
I was asked about using Synfig to create useful icons. Here is the
procedure.
Synfig is useful because one can easily use the predefined shapes as vectors of
any size, like the star - and even amalgamate them - and thus use them in other programs.
One has to be careful, though, in the orginal use of the tool. I can draw a star
with both outline and interior, but if I then crank it around, a shadow of the original
shape remains. I eithr use just the star, or the outline and interior combo with the
outline invisible, as below.
I then do a screen grab of my shape, but now the task is to get rid of the white
background. I copy it to the desktop and open it in Paint 3D. Once there, the
Magic Select tool will rid me of the background.
Expression Design (both programs are Microsoft and compatible). I might be tempted
to change the size of the shape, but it is no longer a vector and the edge will look funny...
I can play with the size within Paint 3D, but in Expression design, that is no longer possible.
I have to paste the size I want.
I then export from Expression Design. To do that, I have to choose the shape before asking
for export. The image area will have a blue outline...
All done. I now have a usable icon on the desktop.
Codemy PG17
Pygame Thursdays delivered some new code on the Aspen game. One now
draws a Score and Lives to the game, a WIN banner, and the player character is bound
to never leave the screen. The text is within the draw() definition, and is called
with the blit() command within draw()...
We have a Game instance called our_game on which we call update(). This is where
draw is called.
Finally, there is a display.flip() call, explained below.
I am using my game icons, which I made in Synfig. It's an easy way to make vector-
shaped characters, and they can look fierce!!
import pygame
import random
# Pygame Setup Stuff
pygame.init()
WINDOW_WIDTH = 900
WINDOW_HEIGHT = 600
screen = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))
pygame.display.set_caption('Codemy.com - Aspen Classes')
clock = pygame.time.Clock()
running = True
dt = 0
player_pos = pygame.Vector2(screen.get_width() / 2, screen.get_height() / 2)
# Define a Game Class
class Game():
def __init__(self, aspen_group, food_group):
self.aspen_group = aspen_group
self.food_group = food_group
self.score = 0
self.lives = 5
# Define Fonts
self.small_font = pygame.font.SysFont("impact", 24)
self.big_font = pygame.font.SysFont("impact", 60)
def update(self):
self.check_collisions()
self.draw()
keys = pygame.key.get_pressed()
if keys[pygame.K_p]:
self.pause_game()
def draw(self):
pygame.draw.rect(screen, "#003660", (0, 100, WINDOW_WIDTH, WINDOW_HEIGHT - 200), 4)
# Text
title_text = self.big_font.render("FEED ASPEN!", True, "#003660")
title_rect = title_text.get_rect()
title_rect.centerx = WINDOW_WIDTH / 2
title_rect.top = 5
win_text = self.big_font.render("YOU WIN!", True, "red")
win_rect = win_text.get_rect()
win_rect.centerx = WINDOW_WIDTH / 2
win_rect.centery = WINDOW_HEIGHT / 2
score_text = self.small_font.render("Score: " + str(self.score), True, "#003660")
score_rect = score_text.get_rect()
score_rect.topleft = (5, 5)
lives_text = self.small_font.render("Lives: " + str(self.lives), True, "#003660")
lives_rect = lives_text.get_rect()
lives_rect.topright = (WINDOW_WIDTH - 5, 5)
# Blit The Text
screen.blit(title_text, title_rect)
screen.blit(score_text, score_rect)
screen.blit(lives_text, lives_rect)
if self.score == 8:
screen.blit(win_text, win_rect)
def pause_game(self):
global running
is_paused = True
# Create pause loop
while is_paused:
# Account For Hitting Enter to unPause
for event in pygame.event.get():
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_RETURN:
is_paused = False
# Account for clicking the X to quit
if event.type == pygame.QUIT:
is_paused = False
running = False
# pygame.quit()
def check_collisions(self):
if pygame.sprite.groupcollide(self.aspen_group, self.food_group, False, True):
# print(len(self.food_group))
self.score += 1
# print(self.score)
# Define an Aspen Class
class Aspen(pygame.sprite.Sprite):
def __init__(self, x, y):
super().__init__()
# Define our image
self.image = pygame.image.load("images/PlayerS.png")
# Get Rect
self.rect = self.image.get_rect()
# Position the image
self.rect.topleft = (x, y)
# Move the image
self.velocity = 5
# Add food group to aspen class
# self.food_group = food_group
def update(self):
self.move()
# self.check_collisions()
def move(self):
keys = pygame.key.get_pressed()
if keys[pygame.K_LEFT] and self.rect.x >= 10:
self.rect.x -= self.velocity
if keys[pygame.K_RIGHT] and self.rect.x <= WINDOW_WIDTH - 95:
self.rect.x += self.velocity
if keys[pygame.K_UP] and self.rect.y >= 110:
self.rect.y -= self.velocity
if keys[pygame.K_DOWN] and self.rect.y <= WINDOW_HEIGHT - 95:
self.rect.y += self.velocity
# def check_collisions(self):
# if pygame.sprite.spritecollide(self, self.food_group, True):
# print(len(self.food_group))
# Define an Food Class
class Food(pygame.sprite.Sprite):
def __init__(self, x, y):
super().__init__()
# Define our image
self.image = pygame.image.load("images/Enemy1.png")
# Get Rect
self.rect = self.image.get_rect()
# Position the image
self.rect.topleft = (x, y)
# Move the image
self.velocity = random.randint(1, 5)
# Create Random Motion
self.dx = random.choice([-1, 1])
self.dy = random.choice([-1, 1])
def update(self):
# self.rect.y += self.velocity
self.rect.x += self.dx * self.velocity
self.rect.y += self.dy * self.velocity
# Keep from leaving the screen
if self.rect.left <= 0 or self.rect.right >= WINDOW_WIDTH:
self.dx = -1 * self.dx
if self.rect.top <= 100 or self.rect.bottom >= 500:
self.dy = -1 * self.dy
# Create an food group
food_group = pygame.sprite.Group()
# Create 5 aspens
for i in range(8):
food = Food(i * 100, 200)
food_group.add(food)
# Create aspen group
aspen_group = pygame.sprite.Group()
# Create and position aspen
aspen = Aspen(200, 510)
# Add aspen to the group
aspen_group.add(aspen)
# Create Game Object
our_game = Game(aspen_group, food_group)
while running:
# poll for events
# pygame.QUIT event means that the user clicked the X to close the window
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# Pick the screen color
screen.fill("silver")
# Blit (copy) screen object at a given coordinates
# screen.blit(aspen, aspen_rect)
# Draw and Move Food and Aspen sprite
food_group.update()
food_group.draw(screen)
aspen_group.update()
aspen_group.draw(screen)
# Update Game Instance
our_game.update()
# flip the display to output our work to the screen
pygame.display.flip()
# Set the clock stuff / delta time in seconds since the last frame
# used for framerate independent physics
dt = clock.tick(60) / 1000
pygame.quit()
Thursday, January 18, 2024
Naughty
Guess what, I finally found what is wrong with yesterday's walk cycle:
the character walks off on the wrong leg and the whole cycle is wrong.
Oh yes, another day on Synfig for me!!!
Wednesday, January 17, 2024
Some progress
I know, I know...the timing is all wrong and he is pointing all over the
place. But, I did get the leg cross-overs!!!
Monday, January 15, 2024
Mysterious Big Bang
source: La Presse
author: Mathieu Perreault
translation: Bing Translate/doxa-louise
Demystifying Science The Mystery of the Big Bang
Every week, our journalist answers scientific questions from readers.
"What was there before the Big Bang?"
Richard Deschรชnes
We don't know, but many astrophysicists are working on models that explain this "singularity".
"In cosmology, we have a model that explains the expansion of the universe after the Big Bang," says Laurence Perreault-Levasseur, an astrophysicist at the Universitรฉ de Montrรฉal. "When you rewind time, the universe gets smaller and smaller. The physical distances between things are decreasing. We get to a point where the universe is so dense that the expansion equations stop working. We need a theory to tell the story of the Big Bang that we don't have right now. »
The density of the universe at the Big Bang is unphatomable. "It's called a singularity,"says Perreault-Levasseur. The equations we have are no longer valid. It's the same thing inside a black hole, there's an extremely dense zone for which we don't have a theory, which we also call a singularity. »
"For everyday life, Newtonian physics can explain phenomena very well, such as the speed and acceleration of a car or a ball," says the Montreal-based astrophysicist, whose work has a strong mathematical component. "For larger masses and distances, general relativity works better. GPS, for example, works with general relativity, which is also needed to calculate Mercury's orbit because it is so close to the Sun. This does not mean that Newtonian mechanics is wrong, but that it is an approximation of general relativity," the researcher continues.
For very, very small scales, however, we have quantum mechanics, which explains how particles such as electrons sometimes behave like waves. "Things in the world of quantum mechanics can be in two places at the same time. It's a probabilistic world, not a deterministic one. It is because of the theory of quantum mechanics that we have the internet and computers. »
The catch is that at the very small scales of the Big Bang, there are "large quantum effects", but also a very large mass. "Normally, quantum mechanics works with low-mass particles. When there's a lot of mass, it's problematic. »
There are many theories to unify general relativity and quantum mechanics, but none work perfectly. The most promising, accordingto Perreault-Levasseur, is "string theory," a complicated mathematical model where particles are like immensely long, one-dimensional strings. But there are also equations that describe an infinite space with several very different universes where light cannot reach, also called the "bubble universe", or "bounces" with a series of expansions and contractions.
An example of this type of modeling was published in 2017 in the journal General Relativity and Gravitation by Juliano Cรฉsar Silva Neves, an astrophysicist at the Federal University of Alfenas, north of Sรฃo Paulo, Brazil. In particular, his study postulates that some very old black holes were created during earlier phases of expansion or contraction of the Universe. "I did my PhD on the physics of black holes," says Neves. I tried to apply the bounce patterns to them. »
Bones3
Will be trying another runthrough to day:
Been enjoying some videos by Australian blogger Russell, who currently lives in
Moscow.