Extremely complex problem: showing a value as an 'axis' on a circle

C

Chris.Holland16

The value represents the orientation in degrees from horizontal


So, imagine a circle where

3 o'clock is 0 degrees

12 o'clock is 90 degrees

9 o'clock is 180 degrees



and a value of 180 is represented by:

a picture of a circle with a horizontal line (going straigh across
the diameter)


and a value of 90 is represented by:

a picture of a circle with a vertial line




Is there any way that Excel can translate a value into this pictorally?








BACKGROUND IF YOU ARE INTERESTED:


taken from

http://www.medem.com/MedLB/article_detaillb_for_printer.cfm?article_ID=ZZZG178LH4C&sub_cat=2017


The "Sphere" column indicates how nearsighted or farsighted you are.
"Cylinder" refers to the measurable degree of astigmatism of your
central cornea. The cylindrical number describes the dioptric
difference between your cornea's steepest and lowest curves.

If you have astigmatism, your cornea is shaped like the back of a
spoon, curved more on one side than the other. The orientation of the
spoon shape can differ from person to person, for instance like a spoon
standing on end or on it's side. ******The "Axis" column describes
the orientation in degrees from horizontal****. Most left and right
eyes with astigmatism are symmetrical.
 
G

Guest

Hi,

In A1 to A37 enter numbers 0, 10, 20, ......... 360.
In B1 enter the formula, =COS(A1*PI()/180)
In C1 enter the formula, =SIN(A1*PI()/180)

Make an XY-Scatter plot of B1:B27 vs C1:C37.

Format the Data Series as:
In the "Patterns" Tab, Line "Automatic", Marker "None".
Get rid of the axes and gridlines.
Now you will have a circle in a blank background.

In D1 enter the number you want. (e.g. 180)
Enterthe following formulas in E1 and F1.
In E1, =COS(D1*PI()/180)
In F1, =SIN(D1*PI()/180)
Enter zeros in E2 and F2

Now add a second plot to the circle you have already created as follows.
For that,
Right click on the circle --> "Source Data"--> In the Series Tab "Add" -->
For X-values highlight the cells E1:E2, and for Y-values highlight F1:F2 -->
"OK"

Now the second plot will show up as two points (one at the center and the
other on the rim of the circle). Right click on the center point, Format
Dara Series -->Patterns Tab, "Line" Automatic and "Marker" None.
The number you have entered in D1 will now show up as a spoke on the circle.
If you value in D1, the spoke will orient itself accordingly.

This graph will differentiate 0 from 180 (3 O'Clock and 9 O'Clock
positions) and similarly 90 from 270 (12 O'Clock and 6 O'Clock).
If you don't want that differentiation, enter the following formulas
(instead of zeros) in E2 and F2, and follow the rest of the procedure.
In E2, =-E1
In F2, = -F1

Regards,
B. R. Ramachandran
 
T

Tom Ogilvy

You can do it with code.

You could manually draw your circle with the line, group them, then hide
this shape (or do that in code as well). the code could then copy it and
rotate it to the correct orientation and make the copy visible.
 
E

Executor

Hi Chris,

It looks like you are an optician or creating something for one.

To my opinion this might be a option:

Create a circle and place a horizontal line in the circle just touching
the edges.
Group those 2 into one shape and give it a name.
e.g.: PicCylR
Make a copy of the shape and give it a new name
e.g. PicCylL

Name 2 cells on your worksheet similar
CellCylR en CellCylL.

If you want to restrict the user to some values put Validation to these
2 cells

Create a Worksheet event on WorkSheet Change

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case Range("CellCylR").Address
Shapes("PicCylR").Rotation = Target.Value
Case Range("CellCylL").Address
Shapes("PicCylL").Rotation = Target.Value
End Select
End Sub

Hoop this helps


Executor
 
C

Chris.Holland16

You are a genius.

An absoulte genius.

Thanks


B. R.Ramachandran said:
Hi,

In A1 to A37 enter numbers 0, 10, 20, ......... 360.
In B1 enter the formula, =COS(A1*PI()/180)
In C1 enter the formula, =SIN(A1*PI()/180)

Make an XY-Scatter plot of B1:B27 vs C1:C37.

Format the Data Series as:
In the "Patterns" Tab, Line "Automatic", Marker "None".
Get rid of the axes and gridlines.
Now you will have a circle in a blank background.

In D1 enter the number you want. (e.g. 180)
Enterthe following formulas in E1 and F1.
In E1, =COS(D1*PI()/180)
In F1, =SIN(D1*PI()/180)
Enter zeros in E2 and F2

Now add a second plot to the circle you have already created as follows.
For that,
Right click on the circle --> "Source Data"--> In the Series Tab "Add" -->
For X-values highlight the cells E1:E2, and for Y-values highlight F1:F2 -->
"OK"

Now the second plot will show up as two points (one at the center and the
other on the rim of the circle). Right click on the center point, Format
Dara Series -->Patterns Tab, "Line" Automatic and "Marker" None.
The number you have entered in D1 will now show up as a spoke on the circle.
If you value in D1, the spoke will orient itself accordingly.

This graph will differentiate 0 from 180 (3 O'Clock and 9 O'Clock
positions) and similarly 90 from 270 (12 O'Clock and 6 O'Clock).
If you don't want that differentiation, enter the following formulas
(instead of zeros) in E2 and F2, and follow the rest of the procedure.
In E2, =-E1
In F2, = -F1

Regards,
B. R. Ramachandran
 
C

Chris.Holland16

Thanks for the tip.

I solved the problem using the maths formulae suggested by a previous
poster.. drawing an xy scatter graph.


I'm not clever enough to understand what you are talking about. but
thanks anyway!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top