• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Math sin expression problem-3

Engaged ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

Hi,

I cant write expression. But I try to. I dnt know how can I write this, because what I wrote is not giving me my expected result.

 

I want the circle to stay  beside the clock. and I linked the circle's Y position movement with the rotation of the clock hand. but the X axis of the circle is in weird position.  how should I write the expression to keep the circle's X positon fixed or whereever I want it or just beside the clock but only Y should be take its value from the rotation of the clock hand.

Please guide me.

 

sin 2.gifsin 7.gif

 

sin 8.gif

 

 

 

TOPICS
Expressions , How to

Views

320

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Sep 26, 2024 Sep 26, 2024

If you want the sun to be next to the clock, adjust the X position of the sun.

You can also adjust the amplitude.

 

Votes

Translate

Translate
Advocate ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

screenshot.png

Your dimensions are separated, so you should return only a single value and not an array.

just return temp value

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

I am very slow at picking clue,  face palm, I dnt understand wht u said. what should I write? 

 

temp = Math.sin(thisComp.layer("rotating hand").transform.rotation / 5) * 100;

[temp [value]];

 

this?? 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

just return:

Math.sin(thisComp.layer("rotating hand").transform.rotation / 5) * 100;

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

It doesnot work!!!   I attached kindly check!! the circle goes some weird position if I write this! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

Try this:

Math.sin(degreesToRadians(thisComp.layer("rotating hand").transform.rotation - 90)) * 100 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

Yours last expression makes the circle comes down a lil bit. In the meantime I googled  and found another tutorial, and from there I picked the essence and this brings down the circle a lot-- 

 

 

x = thisComp.width/2;
y = Math.sin(thisComp.layer("hand").transform.rotation /10) * 400 + thisComp.height/2 + 50;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

but the x position of the circle is still fixed. cant move it freely.I wonder why its fixed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

The calculation depends on the animation you want to create with the expression I gave you.

When the "rotation hand" layer's angle is 0°, the "sun" layer is at the top, and when the angle is 180°, the "sun" layer is at the bottom.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

Yes, the rythm is very cute. The rythm is like a Monk is floating. I like it. but Its still staying at the edge, It dsnt come down and stay beside the clock!!! 😮 why!! I want the cute ocilliation from your expression but also the sun/circle needs to be beside the clock.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

If you want the sun to be next to the clock, adjust the X position of the sun.

You can also adjust the amplitude.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

LATEST

😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 You are sooo erudite. THANK YOU SOOOO MUCH. 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮 😮  I am speechless. Thank you. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines