Generating an entertaining blinking pattern for a 1D LED arrangement [closed] - math

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I want to actuate a hardware featuring a set of 16 LEDs, arranged in a square:
X X X X X
X X
X X
X X
X X X X X
While I can solve the technical details (timer, bit masking, etc.), I am stuck with an artistic question.
What would be a good algorithm for generating an activation pattern (over time) which is entertaining for a human observer?
I don't want to go for a totally random pattern, but also not for something too predictive. Any suggestions, especially with compact generator algorithms are welcome.
LEDs are binary (on/off) and single color, but I could install different LEDs of single color (red,green,yellow).

Some proposals:
Wandering dots which react with each other
More generally, cellular automata
Simple hypnotic patterns (regular, symmetric or rotating, filling up)
Morse code
Random bit patterns (LFSR)
To keep it interesting you can implements several animations and switch between them.
Full disclosure: This advice was given after a weekend at Das Labor in Bochum.

Related

spline approximation with specified number of intervals [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
So - edited because some of us thought that this question is off-topic.
I need to build spline (approximation) on 100 points in one of environments listed in tags. But I need it with exact number of intervals (maximum of 6 intervals - separate equations - in whole domain). Packages / libraries in R and Maxima which I know let me for building spline on this points but with 25-30 intervals (separate equations). Does anyone know how to build spline with set number of intervals without coding whole algorithm all over again?
What you're looking for might be described as "local regression" or "localized regression"; searching for those terms might turn up some hits.
I don't know if you can find exactly what you've described. But implementing it doesn't seem too complicated: (1) Split the domain into N intervals (say N=10). For each interval, (2) make a list of the data in the interval, (3) fit a low-order polynomial (e.g. cubic) to the data in the interval using least squares.
If that sounds interesting to you, I can go into details, or maybe you can work it out yourself.

How to graph an equation in the form z=x*y (programme needed) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i would like to graph this kind of equation, z=x*y. I would like to set intervals like -n< x <-n and so on, to see how z varies in function of x and y at the same time. I also need to check the value of z at given x and y and see where z is at its maximum, for example. Thanks and have all a nice day!
Edit: the equation i am trying to study is z=x * (164+0.25y)
where 0 < x < 2.5 and 0 < x < 700.
P.S. I don't understand the downvotes, I kindly asked for a question in a polite way, providing as many details as I could.
This question may be a little outside of the scope of this site, but in regards to a graphing program:
One of the easiest ways to determine things about graphs is to use Wolfram Alpha a computational knowledge engine. A quick tour on the site and just trying a few things out should get you to where you want to go pretty quickly.
Since you appear new to this site, check out some of the Stack Overflow Basics and be sure to up-vote any help you get or questions you may find helpful.

Finding private Key x Big integers [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Well is it possible to find private key x for this equation y=g^x mod p of course big integers if you have p ,g, y, q?.
What method can be used if there is method to find it out? ..........Note:These are big Integers
This is called the discrete logarithm problem. You seem to be interested in the prime field special case of this problem.
For properly chosen fields with sufficiently large p this is infeasible. I expect this to be reasonably cheap (100$ or so) for 512 bit p and extremely expensive at 1024 bit p. Going beyond that it quicky becomes infeasible even for state level adversaries.
For some fields it's much cheaper. For example solving DL in binary fields (not prime fields as in your example) produced quite a few recent papers. For example Discrete logarithm in GF(2^809) with FFS and On the Function Field Sieve and the Impact of Higher Splitting Probabilities: Application to Discrete Logarithms in F_2^1971.

What math field can deduce equations for a hand-drawn shape? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Suppose I have an Arabic character hand-drawn in Thuluth font, as in:
http://arabicletters.info/wp-content/uploads/1.jpg
I was thinking of a way I can recreate the same shape but at a much greater height, whilst leaving the other characteristics intact (stroke width, thickness, the relation of where the curving starts to happen to the height) which then got me curious about a way of finding its mathematical representation and play with it until I can get what I want or any other shape for that matter. Is there a math sub-specialty that can help with this? and for this particular problem, can it be solved using programs like Adobe Illustrator or AutoCAD?
Forgive the noobness.
I don't think deduce is the right word.
You can get what you want if you add sufficient points and do Bezier spline fits to match the letters.
There might be a way to automate the process of adding points, but the "sufficient" criterion is tricky. And then you'd have to tell how to connect points with splines.
Sounds like you're trying to reproduce optical character recognition in Arabic.

Divide 9×3 rect into 8 equal size square [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
You whip up your favorite brownie recipe and pour into your new 9×3 inch baking dish. The brownies bake. The toothpick comes out clean. Now for the cutting.
A square is the most delicious shape for a brownie. You have eight people to serve. How can you cut your newly baked creation into exactly eight square pieces?
So this is essentially a variation on a bin packing problem (which is well known to be NP-hard!).
One solution is to use 2 3x3 squares, 1 2x2 square and 5 1x1 squares, as follows:
The solution is obviously non-unique, since the positions of the various squares can be permuted around.
Due to the NP-hardness I imagine it would be difficult to come up with an efficient algorithm to divide a general NxM rectangle into k square pieces exactly. In fact there must be whole families of parameter values for which no solution is possible (for instance if you started with an 6x1 rectangle it would be impossible to divide into anything less than 6 squares...).

Resources