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

  • Home
  • SEARCH
  • 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 7781837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:21:14+00:00 2026-06-01T19:21:14+00:00

Turning a line into a ring is a simple task in graphics programs such

  • 0

Turning a line into a ring is a simple task in graphics programs such as GIMP:

Filter ⇒ Distorts ⇒ Polar Coordinates
(source: adamhaskell.net)

I’m trying to work out if it’s possible to produce the same effect in CSS.

So I worked out the following:

  • The above algorithm maps x to r and y to θ
  • To do this, x is scaled to the range of [0,w/2], with w being the width of the image
  • Also, y is scaled to the range of [0,2π]
  • To transform polar coordinates back into Cartesian: xc = rp*cos(θp) and yc = rp*sin(θp)
  • The result is then translated so the origin is in the centre of the image.
  • So we have:

 

x' = (x/2)*cos(y/h*2π) + w/2;  
y' = (x/2)*sin(y/h*2π) + h/2;

This is all fine and dandy, but how can I produce such a transform in CSS? Presumably none of the keywords are useful, so it has to be a Matrix transform. Well, I have no idea how to build a matrix from the two equations above, much less how to represent it in a CSS transform.

Can anyone help me on this last step?

  • 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-06-01T19:21:15+00:00Added an answer on June 1, 2026 at 7:21 pm

    I never worked with CSS transform matrices, but I think what you want is not possible.
    Using transform matrices you do a linear transformation. Linear transformations ALWAYS map a straight line to a straight line or to 0. Take a look at Wikipedia for more information.

    So it’s impossible to map a straight line to a circle using matrices.

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

Sidebar

Related Questions

Trying to determine the last line location of execution using gdb is turning into
I have a very long line of HTML. I tried turning: <code><othercode> into <code><
I need help in turning this linq expression into a linq statment. SampleData.Publishers and
I'm turning a list into a set in Python, like so: request.session['vote_set'] = set(request.session['vote_set'])
I talked my team into turning on compiler warnings again. Some how all warnings
I'm looking for a method of turning a NSMutableArray into a string. Is there
I am trying to do a pretty simple thing - it is reading a
I am turning some piece of Python code into OO-code. I define a class
Does anybody know the syntax of turning a list of lists into something that
I have a UL LI menu that I am turning into a select dropdown

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.