Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 9:49 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Display Score on horizontal bar
PostPosted: February 5th, 2011, 2:29 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi,

I'm trying to create a visual display of a test score where the score's raw value can range from -6.18046 to +6.18046. These are results from a statistical formula used to process the scores and can be interpreted as problematic on the low end to successful on the high end.

To make these meaningful to the test taker, it would be helpful to show the result on a horizontal bar from lowest on the left end to highest on the right end (no actual numbers need to be displayed). I thought of 4 sections to the bar, coloring the low end 1/4 as red, the bottom middle 1/4 as yellow, the next 1/4 section as light green and last 1/4 as deep green.

I'm not sure how to set up the action to automatically move, for example, a slider or pointer along the bar based on the score calculation (for example, a button that calculates the score can also set the pointer based on its value between -6.18046 and +6.18046.)

Any suggestions would be appreciated.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Display Score on horizontal bar
PostPosted: February 5th, 2011, 10:37 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Hi Stephen,

Saturday here, so I'll just throw out some thoughts for now. At first I thought you wanted to move the bar, but I read it closer that you only want to move a pointer.

So try this.
You may as well divide your horizontal bar into 12 segments or so.
Create a triangle vector for the pointer. Say Vec01. Put it and the Bar into a Frame. Size the Frame to show the whole Bar. Position the pointer outside the Frame left or right.
Once you have a Score1 to illustrate, use: Vec01.SetPosition( (Score1 * factor1 /2)+550, 350 ) //assumes the Bar has a X-position of 550 and Y-position ~350)
**If your Bar was 124 pix wide, factor1 would be approx. EQ 10 ( 6.2 + 6.2 times 10 EQ 124 wide)
* As shown above, "Score1" and "factor1" are moving the pointer relative to the center of the Bar. You could use these differently to simply move it relative to the left edge as well.
* As an added effect, you could use BarSegment01.IsIntersecting( Vec01 ) and then change the color of that bar segment. Loop or duplicate for other segments.

BTW, you could have a muted image of a bell curve, T curve in the background to add some perspective.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Display Score on horizontal bar
PostPosted: February 6th, 2011, 12:02 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Larry,

Thanks for these ideas.

I had done a bar graph with some help a while ago (the posts are in the forum). I may be able to adapt it as an alternative way to display the scores. The challenge is in setting up the correct formula in the script to set the zero point at -6.18... and the top point at +6.18..., then divide up the in-between area so that it accurately shows the bar reaching an actual score point. Something like that, anyway... :)

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Display Score on horizontal bar
PostPosted: February 6th, 2011, 3:39 pm 
Offline

Joined: October 25th, 2004, 2:20 pm
Posts: 686
Location: Naperville, Illinois (USA)
Opus: 7.05
OS: Win XP SP3
System: P4 3.2GHz 1GB RAM 2-TB HDs + 4 more
What about creating a graphic of what the colored bar looks like when all colors are shown, then cover it with a Frame with a solid background. You can then move the cover Frame to the right, which will reveal whatever part of the bar scale you want.

_________________
Fred Harms, Extraordinary Demos
Naperville, Illinois (USA) 630/904-3636
demofred@aol.com


For this message demofred has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Display Score on horizontal bar
PostPosted: February 6th, 2011, 4:23 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Just offset the score by 6.18046.

This will give you a range of 0 - 12.36092 and will allow you to calculate the actual score as a percentage - IE score of 0 (before offset!) will be 50%.

Then just use the percentage to calculate the position on the bar (IE bar length is 320 pixel thus 50% is 160) and use setposition() function.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Display Score on horizontal bar
PostPosted: February 6th, 2011, 5:10 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi,

Thanks Fred. I had played with a similar idea, but since my pub's page background is black, I was not able to get the 4-color bar's colors to not be affected by the page background. (I probably did something wrong. :oops: So, may be worth another try.)

Thanks Mack. I have not been able to get my brain around the maths, having tried a variety of formulas. I am using Brenden's graph IMP, trying to change the formula, without success.

I'll attach the IMP. The original working formula (without using the new score range -6.18... to +6.18...) was setting bar1 to first*5 for the thinner bar. My own shorter bar (thicker blue version) is included but not currently working. I'll leave the initial formula in the IMP. But I haven't been able to recalculate the formula for the new range where 0 = 50%.

Kind Regards,


You do not have the required permissions to view the files attached to this post.

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Display Score on horizontal bar
PostPosted: February 7th, 2011, 12:09 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
A simple solution :-)

Mack


You do not have the required permissions to view the files attached to this post.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


For this message mackavi has been thanked by : Stephen


Top
 Profile Visit website  
 
 Post subject: Re: Display Score on horizontal bar
PostPosted: February 7th, 2011, 1:04 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Brilliant, yes! Simple: no. Actually a very sophisticated little script.

I played with formulas all of yesterday, adding, subtracting, multiplying, dividing, without success.

Thanks very much.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 42 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group