Solved

vb.net euclidean math

Posted on 2016-09-25
2
44 Views
Last Modified: 2016-09-25
I have a vb.net forms windows app. I have 16 buttons representing the steps of a sequencer.
I would like to mimic the attached. if the user selects 16 we see 16 if they choose 8 we only see 8. after that the euclidean math should tell me the buttons to illuminate. the embedded drawings explain better.

so the user enters the total steps and then the fills and the buttons illuminate.

I can deal with the button behaviours and combo's. I dont know how to use the maths euclid function to get the results I need i.e which buttons to illuminate based on the euclidean algorhthm.




ex1e1e2
0
Comment
Question by:PeterBaileyUk
2 Comments
 
LVL 33

Accepted Solution

by:
ste5an earned 500 total points
ID: 41814618
It don't see the connection to Euclides. You just do an even distribution:

Number of buttons / Number of buttons to highlight = Step widtht

Then divide your button position by that step width and round the result. This gives you the possible highlight positions. There are 3 possible highlight patterns for 16/7:

Capture.PNG
0
 

Author Closing Comment

by:PeterBaileyUk
ID: 41814629
I will see if i can write a function to do it. thank you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now