Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6180077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:46:59+00:00 2026-05-24T00:46:59+00:00

To all mathematicians out there please read the whole question, this could be answered

  • 0

To all mathematicians out there please read the whole question, this could be answered without any HTML5 knowledge 🙂

I am zooming (scaling) a HTML5 canvas and i want to do that in a lot of small steps instead of one big step to make the scrooling seem “smooth”. To explain that:

When the user turns the scroolwheel once my goal is to scale the canvas by 20% in total. Now i want to divide this into lets say 20 small steps.

My problem is, that due to the restricted library of the canvas i can only use the scale(xscale,yscale) method of the 2d Context to do so. So i cant set the units to a specific size, that would make it easy. I have to use a factor in every single step and i can’t figure out how this could be done.

So the units of my canvas has been 100 in step 1 i want them to be 130 in step 20 with 19 small steps in between.

  1. oldscale: 100, : factor: x, newscale: 101
  2. oldscale: 101, : factor: x, newscale: 102
  3. oldscale: 102, : factor: x, newscale: 103

……

The variables i now is the current stepnumber (0-19), totalsteps (20) and target-zoom in percent (20)

That is a very simple example of what i need. The main problem is, that i only have access to the X and i cant affect the scales directly.

Can anyone help? I hope i explained it well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:46:59+00:00Added an answer on May 24, 2026 at 12:46 am

    You need the 20-th root of 130/100. To compute it use

    k = Math.exp(Math.log(130/100) / 20)
    

    k raised to the 20-th power will be 130/100.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, Apologies in advance - this question might be too open-ended for SO. Anyway...
ALL, is there any solution to get the number of opened files in my
All the guys probably will recommend that I read the follow previously question in
All is in the question i have tried this : $('#my-div').css('box-shadow'); but it returns
All I want is to update an ListViewItem's text whithout seeing any flickering. This
All, This is a follow up for my question here . My setup: Visual
All of the code in my project is procedural. It isn't using any framework,
All, There is a website that doesn't seem legitimate that and keeps showing all
All, I am trying to create a table to receive user inputs (UGC). This
All, I'm using wordpress with this and for some reason the eventDrop stopped working.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.