Open Side Menu Go to the Top

04-05-2016 , 08:11 PM
Quote:
Originally Posted by clowntable
I don't have an account on any of these sites and get ridiculed for it quite often.
I respect it greatly and wish I could say the same. I'm sure I over-estimate its value.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards ? Splash Pots ? CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
04-05-2016 , 08:54 PM
I apologize for the vagueness of this, but my question isn't well formed yet, which is why I'm having trouble googling it.

Say I have 2 curves - I am not picky about what type they are, bezier, quadratic, nurbs, whatever, as long as it can support both straight edged polygons and fair curves. I want an algorithm to blend them. Like say there's a function
blend(curve1, curve2, factor)
when factor=0, the result is curve1. When factor=1, the result is curve2. For values between 0 and 1, the result is a mixture, starting looking like curve1 and increasingly looking like curve2 as factor increases.

I just started toying with this today. In case it turns out to be intractable I am hoping there is something that exists already.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2016 , 08:54 PM
Quote:
Originally Posted by Grue
Sideproject mvp went feature complete today too cool. Somehow my estimate of alpha in May when I started in November looks solid too. Lots of QA and UI junk to go though.. and the whole learning how to deploy something too. If it catches on at all guess I'll find out the answer to the "how many 1000ms intervals can node handle" question.
What is it / what does it do?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2016 , 08:57 PM
node/react multiplayer game based off an indy board game, think "lobby" etc, lots of socketio stuff.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2016 , 09:05 PM
Quote:
Originally Posted by RustyBrooks
I apologize for the vagueness of this, but my question isn't well formed yet, which is why I'm having trouble googling it.

Say I have 2 curves - I am not picky about what type they are, bezier, quadratic, nurbs, whatever, as long as it can support both straight edged polygons and fair curves. I want an algorithm to blend them. Like say there's a function
blend(curve1, curve2, factor)
when factor=0, the result is curve1. When factor=1, the result is curve2. For values between 0 and 1, the result is a mixture, starting looking like curve1 and increasingly looking like curve2 as factor increases.

I just started toying with this today. In case it turns out to be intractable I am hoping there is something that exists already.
I'm no stats major, but if your curves have a bunch of points, couldn't you just apply the factor by multiplying it with the difference between two points?

Like point a is 0,3, point b is 0,5. Difference is 2. Factor of zero is 0,3, factor of 0.5 is 0,4, etc.?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2016 , 09:21 PM
Quote:
Originally Posted by RustyBrooks
I apologize for the vagueness of this, but my question isn't well formed yet, which is why I'm having trouble googling it.

Say I have 2 curves - I am not picky about what type they are, bezier, quadratic, nurbs, whatever, as long as it can support both straight edged polygons and fair curves. I want an algorithm to blend them. Like say there's a function
blend(curve1, curve2, factor)
when factor=0, the result is curve1. When factor=1, the result is curve2. For values between 0 and 1, the result is a mixture, starting looking like curve1 and increasingly looking like curve2 as factor increases.

I just started toying with this today. In case it turns out to be intractable I am hoping there is something that exists already.
i think i must be misunderstanding, but each if each curve is a function of x, then blend is a function of x, and you have:

Code:
blend = x => (1-factor)*curve1(x) + factor*curve2(x)
but i feel like you wouldn't have asked it if the answer were that simple. maybe at least this will help clarify...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2016 , 09:39 PM
It might be that easy if I can parameterize both curves on the same variable. I guess I'll experiment with it and see what I get. The thing is, this kind of algorithm works well if you think of your "curves" as actually being discrete sets of segments, but that is what I'd consider a last resort.

For example, a square is best represented by a set of line segments
A circle is best described as a center and a radius (representing it as line segments is inexact at best)
A transitional form would probably be something along the lines of
a^n + b^n = c^n
You'll note that a circle is this with n=2. As n increases, it gets more square like.

So I guess you could say, I would like both curves to be in a symbolic form (such as bezier curves or nurbs) and I'd like the result of the function to similarly be in symbolic form. This is not a *strict* requirement, but for my purposes it'll work better.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-05-2016 , 10:32 PM
So I have something working, and it's OK, but it clearly has limitations. Here's the basic thrust of it.

Find the centroid and the bounding box of each curve. Scale and position them so that they're approximately the same size and have the same center. Sweep a line around a full 360 degrees, with whatever step you like. At each step, find the intersection of the line with each curve. Calculate the new point using blend like above
blend = x => (1-factor)*curve1(x) + factor*curve2(x)
The blended object is made from the blended points.

The main limitations are that if a curve has a segment that if extended would intersect the centroid, then the sweeping line will intersect it as not a point, but a line. I don't know what to do with these cases, but they might not ever really come up.

Another problem is that if the curve doubles back on itself, then it will have multiple intersections with the sweeping line, and I don't know how to parameterize it in this case. Again, maybe I should worry about it if it comes up.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2016 , 04:53 PM
Quote:
Originally Posted by Grue
node/react multiplayer game based off an indy board game, think "lobby" etc, lots of socketio stuff.
Oh....I might be interested in this. I'm a huge board game fan (collection of maybe 200 or so). My two "side projects" (not doing nearly enough on them to call them that) are cloning a board game in JS/React/Node (mostly to learn JS stuff) and doing DSL stuff (currently Xtext) for board game rules engine and AI prototyping.

We also built a strange card game server (strange because it mixed Java, JS and Prolog) with lobby, chat etc. at my old job...but it was very nastily hacked together. Java for web backend stuff, Prolog for game logic, AI, and declarative front end layout descriptions (JS with no library, HTML and CSS for the client). I joined kind of late and only worked on implementing game logic, layouts and AIs. Pretty much only touched the Prolog parts.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2016 , 05:04 PM
I know you'll be interested in this heh. I've PMed you a github link feel free to poke around/give me free code review if you want. Like I said another 1-2 months before an alpha event that I'll invite everyone I know to.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2016 , 05:09 PM
Yeah I'm in fairly busy mode (not getting much done on said sideprojects) at the moment but will poke around eventually.

I also just checked my BGG account and it's aparently 281 games and 131 expansions owned. I might have a problem
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2016 , 05:16 PM
Quote:
Originally Posted by clowntable
Yeah I'm in fairly busy mode (not getting much done on said sideprojects) at the moment but will poke around eventually.

I also just checked my BGG account and it's aparently 281 games and 131 expansions owned. I might have a problem
Have you even played all these?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2016 , 08:40 PM
FWIW my gf works for the Fandango (the movie ticket co). She said they tried react on one of their sub-sites and it ended in disaster. The company has now sworn it off.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2016 , 08:52 PM
meh. Its a one way data bound lighter weight angular with no built in app-level state management that prefers "markup in your javascript" as opposed to "javascript in your markup". Probably pretty easy to screw up. I like it, but I like/prefer gulp over webpack too. Of course my current project has 80+ dependencies...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2016 , 09:18 PM
I don't do javascript but IME every popular framework has been tried, crashed and burned, and been sworn off of.

In similar things I'm more familiar with, it's usually a reasonable shallow effort where they try to shoehorn their existing paradigm into whatever framework is being tried, and when it doesn't work, they just give up.

I once worked on a trial project to convert a website from one webserver to another. The new webserver was undeniably better. However, they insisted on maintaining a dependence on a backend that could only be talked to, one connection at a time, via a TCP channel. The original webserver was essentially single threaded, so that wasn't a limitation. It was on the new webserver, which was multithreaded (this was a very long time ago as these things go)

So, the new webserver did not perform better, and they gave up on it and declared that it sucked, and that was that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2016 , 11:10 PM
Quote:
Originally Posted by Grue
meh. Its a one way data bound lighter weight angular with no built in app-level state management that prefers "markup in your javascript" as opposed to "javascript in your markup". Probably pretty easy to screw up. I like it, but I like/prefer gulp over webpack too. Of course my current project has 80+ dependencies...
aside from being a javascript web framework with a form of auto-updating when data changes, in what ways is it like angular?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-06-2016 , 11:15 PM
Quote:
Originally Posted by RustyBrooks
I don't do javascript but IME every popular framework has been tried, crashed and burned, and been sworn off of.

In similar things I'm more familiar with, it's usually a reasonable shallow effort where they try to shoehorn their existing paradigm into whatever framework is being tried, and when it doesn't work, they just give up.

I once worked on a trial project to convert a website from one webserver to another. The new webserver was undeniably better. However, they insisted on maintaining a dependence on a backend that could only be talked to, one connection at a time, via a TCP channel. The original webserver was essentially single threaded, so that wasn't a limitation. It was on the new webserver, which was multithreaded (this was a very long time ago as these things go)

So, the new webserver did not perform better, and they gave up on it and declared that it sucked, and that was that.
this is spot on, and i feel the same could be said about diets, acupuncture, the effects of yoga, etc, etc, etc
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2016 , 01:20 AM
Quote:
Originally Posted by RustyBrooks
Find the centroid and the bounding box of each curve. Scale and position them so that they're approximately the same size and have the same center. Sweep a line around a full 360 degrees, with whatever step you like. At each step, find the intersection of the line with each curve. Calculate the new point using blend like above
blend = x => (1-factor)*curve1(x) + factor*curve2(x)
The blended object is made from the blended points.
Is this for sure how you want to define the blend for all curves?

For example, let's say your curves are y=sin(x) and y=cos(x). You could weigh across the y values for all x in the domain, or weigh across the r values for all thetas between 0-360 degrees, which seems to be what you're saying here. They'll give you different results, although each look like a reasonable way to define a "blend" without any other information. There are plenty of other ways to define a reasonable blend as well. Some may look more reasonable with specific types of curves.

Since you're rescaling and seem to be interested in curves with finite dimensions, another possible solution is to normalize by arc length and weigh across the function values for all values of t. If you need the result to be a function you can weigh the derivatives then integrate the result.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2016 , 08:52 AM
By "curves" I mostly don't mean polynomial functions. I mean, like, a square and an oval or a 5 pointed star and a triangle.

I've been considering parameterizing by arc length as you mentioned and seeing what that looks like. There are some transitions that I'd like to be able to do that neither method will support, though, I think. I'll see if I can post some examples later.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2016 , 10:07 AM
Quote:
Originally Posted by suzzer99
FWIW my gf works for the Fandango (the movie ticket co). She said they tried react on one of their sub-sites and it ended in disaster. The company has now sworn it off.
What kind of disaster?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2016 , 11:00 AM
Quote:
Originally Posted by RustyBrooks
By "curves" I mostly don't mean polynomial functions. I mean, like, a square and an oval or a 5 pointed star and a triangle.
I think you'll run into similar issues either way. I just picked sin/cos because they're easy functions to throw in a graphing calculator to see how blending vertically, horizontally, or radially could lead to different results. Same problem if your curves are a circle and a square. The hardest part is going to be figuring out how you want it defined. Or if the answer is "it depends," establishing a set of definitions and making sure you can choose one for all valid inputs.

Just to throw out another possibile consideration: if your curves are shapes that have a height and width property, or dimensions in any other arbitrary axes, you may want to split the curves based on those dimensions before any further processing. For example, a tall right triangle circumscribed within a circle. Intuitively you would think a blend would keep the 3 points of intersection fixed no matter what ratio you choose, but if you parameterize by the entire arc length, that won't be the case. If you align the centroids so that the shapes are no longer circumscribed, that won't be the case if your blend function works radially either. In either of those cases you'd get some really wonky results. Splitting each curve into 3 parts (using the intersections as bounds) and then processing each section using an arc length parameterization would be OK if I'm understanding the problem correctly. That may even be an acceptable general solution, but the problem is you'll have curves where the split points aren't as well defined.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2016 , 11:46 AM
Quote:
Originally Posted by ChrisV
What kind of disaster?
From gf:

1. Performance issues on mobile. (responsive web)**2. In a single page app, since next screen element does not exist in the dom yet, unable to do transition effects.**This alienated our product team. 3. Hard to support when the site is handed over to Ops***4. Not enough information on the web regarding troubleshooting when we run into problems (biggest issue).**

I think the fundamental problem was that we used React on a site that does not need react - it’s a content site whereby each page is fairly static.**React is great for a site that needs to have elements on the page updated in real time.*

Last edited by suzzer99; 04-07-2016 at 11:52 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2016 , 12:20 PM
Quote:
Originally Posted by maxtower
Have you even played all these?
No. There's maybe 10-20 still in shrink wrap and a whole lot that I bought for cheap but never played (maybe 30?) somewhere and two boxes of kickstartered games that are still in the shipping package. I usually get around to playing all of them though.
A bunch are also doubles (since I hate that they separate 1st, 2nd etc. edition I usually just mark all of them as owned). There's maybe 100 or so games in the shelves behind me that get/got good play.
The expansions are also way less than it seems. I own a couple of living card games and each 8$ pack of cards counts as an expansion (same for some of the tabletops where each new unit counts). Between X-Wing, Star Wars LCG, Android Netrunner and LOTR that's maybe 60-80 expansions accounted for.

It doesn't help that I am a graduate of the University of Essen (since renamed). Essen is home of the biggest board game fair in the world so having that right next to you for 10 or so semesters adds up :P

Last edited by clowntable; 04-07-2016 at 12:26 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2016 , 12:37 PM
Quote:
Originally Posted by suzzer99
2. In a single page app, since next screen element does not exist in the dom yet, unable to do transition effects.
I ran into this issue on a mithril app (design similar to react). You can work around it, but it definitely doesn't fit well with the model and is a legitimate complaint. I'm actually surprised to hear react hasn't baked in support for it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
04-07-2016 , 02:53 PM
eh? Is it that hard to render it to the dom with display none on it then immediately do whatever transition? There's even an exact method for what you'll need, componentDidMount. or just bake it into the rendor directly by adding a class to fade or slide it in.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards ? Splash Pots ? CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m